Regular Expressions (RegEx) in AutoHotkey

Helpful script writing tricks and HowTo's
User avatar
jackdunning
Posts: 126
Joined: 01 Aug 2016, 18:17
Contact:

Regular Expressions (RegEx) in AutoHotkey

Post by jackdunning » 26 Dec 2019, 16:30

I consider Regular Expressions (RegEx) one of the most flexible tools available in AutoHotkey when using the RegExMatch() function or RegExReplace() function. However, it does take the new user a little time to figure out how to put them to work.

Over the past few years, I've written numerous blogs on the topic. I've scanned the list to select those which new AutoHotkey users might find the most useful. Regular Expressions (RegEx) break the limits placed on scripts by the InStr() and/or StrReplace() functions.

A Perfect Place to Use an AutoHotkey Regular Expression (RegEx in Text Replacement)
Occasionally, you run into a search-and-replace problem that cries out for an AutoHotkey RegEx (Regular Expression). But is learning how to use Regular Expressions worth your time? You decide! Here’s a real problem and a beginner’s mini-tutorial for solving it with RegEx.

Deleting Double Words with AutoHotkey Regular Expressions (RegEx)
When too many identical chapter numbers appear in the e-book index, it’s time for another AutoHotkey RegEx. Includes how to use a backreference!

Quick and Dirty Complex Text Replacement with Ryan’s RegEx Tester
While not for beginning AutoHotkey scriptwriters, this Regular Expression (RegEx) trick executes multiple complex text replacements without even writing an AutoHotkey script.

Regular Expressions (RegEx) for Parsing Text
The RegExReplace() function makes it easy to extract and cleanup text, plus a quick-and-dirty RegEx to strip all HTML tags.

Web Data Extraction Script (An Easy AutoHotkey RegEx Trick)
A simple Regular Expression (RegEx) retrieves your daily horoscope by harvesting data from a web page—this 10-line AutoHotkey script demonstrates how to build your own web-based pop-ups.

Using Regular Expressions to Convert Most Formatted Dates into DateTime Stamps
AutoHotkey offers many techniques for converting the DateTime stamp (yyyymmdd) into formatted dates, but what about going in the other direction? Use RegEx to identify date formats—including British and American!

Powerful RegEx Text Search Shorthand (~=)
AutoHotkey provides an abbreviated Regular Expression RegExMatch() operator ( ~= ) for quick wildcard text matches

AutoHotkey Regular Expressions (RegEx) Page

See also, my book A Beginner's Guide to Using Regular Expressions in AutoHotkey.

alexawiliams784
Posts: 2
Joined: 21 Apr 2020, 05:03

Re: Regular Expressions (RegEx) in AutoHotkey

Post by alexawiliams784 » 23 Apr 2020, 01:39

Great Share. Thanks.

Post Reply

Return to “Tutorials (v1)”