• Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

Extract email address from text with Regular Expression in AutoHotkey

Extract email addressRegular 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

RegEx 108-Return your match in AutoHotkey Regular Expressions match object

AutoHotkey Regular Expressions match objectNeed 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