AutoHotkey Regular Expressions (RegEx)

New Regular Expressions (RegEx) Series with Tips and Tricks

Finding US Zip Codes (AutoHotkey RegEx Tips Part 1)

Finding UK Postal Codes (AutoHotkey RegEx Tips Part 2)

Removing Excess Tabs and Spaces with RegEx Greed (AutoHotkey RegEx Tips Part 3)

Pasting Date Parts into Forms (AutoHotkey RegEx Tips Part 4)

*          *          *

Quick and Dirty Web Data Extraction Script (An Easy AutoHotkey RegEx Trick)

Using Regular Expressions to Convert Most Formatted Dates into DateTime Stamps (AutoHotkey Tool)

A Perfect Place to Use an AutoHotkey Regular Expression (RegEx in Text Replacement) January 1, 2016

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) January 9, 2016

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.

AutoHotkey Library Deal
AutoHotkey Library Deal

AutoHotkey StringSplit Command and ErrorLevel Tricks for Swapping Words (Beginning Hotkeys Part 10) March 31, 2016

Techniques for Swapping Words Using the StringSplit AutoHotkey Command; ErrorLevel for Producing Alternative Results; a Glance at a Regular Expression (RegEx) for Swapping Words.

Quick and Dirty Complex Text Replacement with Ryan’s RegEx Tester (AutoHotkey Tip) June 16, 2016

While Not For Beginning AutoHotkey Script Writers, This Regular Expression (RegEx) Trick Executes Multiple Complex Text Replacements without Even Writing an AutoHotkey Script.

Fixing Grammar Problems with Google Search (Intermediate AutoHotkey Tip) September 22, 2016

The GooglePhraseFix AutoHotkey Script Corrects Many Common Spelling and Grammar Errors While Demonstrating How to Download Information from the Web…Without Opening a Browser.

The Problem with Accessing Web Data with AutoHotkey Scripts October 30, 2016

The Trouble with Scripts Which Use Web Page Information, Plus AutoHotkey Tools for Downloading Web Page Source Code.

AutoHotkey Quick Reference Script (Part Two) November 4, 2016

The AutoHotkey.com built-in Index Reappears—Now to Build a Reference Tool!

Regular Expressions (RegEx) for Parsing Text (AutoHotkey Quick Reference Script Part Three) November 12, 2016

The RegExReplace() Function Makes It Easy to Extract and Cleanup Text, Plus a Quick-and-Dirty RegEx to Strip All HTML Tags.

Using INI Files for Web Address Letter Case-Sensitivity Problems (AutoHotkey Quick Reference Script, Part Four) November 28, 2016

The Wrong Capitalization of Letters in URLs Can Cause Page Access Failure—A Trick for Using an INI File to Solve Case Problems in AutoHotkey.

Ryan’s RegEx Tester for Building INI Data Files (AutoHotkey Quick Reference Script, Part Five) December 5, 2016

Extracting Multiple Dates from Text Using AutoHotkey RegEx, March 22, 2021

Sometimes It’s Quicker and Easier to Use Ryan RegEx Tester Rather Than Writing an AutoHotkey Script

I had three objectives:

  1. Locate dates in any of the three (or more) formats identified in the DateStampConvert.ahk script (American, European, and all numeric).
  2. Extract only the first and last date in the selected text by ignoring any spurious dates appearing in-between. Only this approach would ensure the accurate selection of two target dates.
  3. Save those two dates as subpatterns for conversion into the DateTime stamp format.

AutoHotkey RegEx

This Beginner’s Guide to Using Regular Expressions in AutoHotkey is not a beginning level AutoHotkey book, but an introduction to using Regular Expressions in AutoHotkey (or most other programming languages). To get the most from this book you should already have a basic understanding of AutoHotkey (or another programming language). Regular Expressions (RegEx) are a powerful way to search and alter documents without the limitations of most of the standard matching functions. At first, the use of RegEx can be confusing and mysterious. This book clears up the confusion with easy analogies for understanding how RegEx works and examples of practical AutoHotkey applications. “Regular Expressions in AutoHotkey” will take you to the next level in AutoHotkey scripting while adding more flexibility and power to your Windows apps. (This book is also available at Amazon.com)

For more details about Regular Expressions in AutoHotkey (Table of Contents and the entire book index), click here!