A subscriber of my YouTube channel had an issue with using RegExMatch. I decided it was better to walk through the process in a video than to just provide the code. 🙂 As mentioned in the video I highly recommend Jack Dunning’s Regular Expressions AutoHotkey book. Continue reading
Regular Expressions are incredibly helpful for day-to-day tasks! In this short video I demonstrate how easy it is to use a Regular Expression (RegEx) in AutoHotkey to extract email addresses from text. The first half of the video shows how I use it to parse the haystack listed in the script. The second half of the video I make a minor tweak and adapt it to work with any program that you can copy text to the clipboard.
Below is the code to extract emails with a Regular Expression that I demonstrate in the video
Extract email addresses via Regular Expression in AutoHotkey
Need to get additional information about your RegExMatch? Why not return a AutoHotkey Regular Expressions match object? Having your data returned in an object allows for some great information like: Length, location, name of subpattern, etc. With AHK you can use the O) option to store the matches into an AutoHotkey object. The below video walks through how to do it and gives you a clear example how to access it once it is created.
Create and access an AutoHotkey Regular Expressions match object
Here is the code demonstrated in the video