A subscriber reached out to me (after trying for a few hours) for some help on creating a Regular Expression to pull-out URLs from text. Specifically not including email addresses. Since he gave it a solid try I wanted to help him out. I did a google search and found this post which had the RegEx pattern for finding a URL and not an email address. I then took the pattern and put it on Regular Expressions 101 to make sure it would work in AutoHotkey. After that I adapted it to AutoHotkey code (see below) using RegExMatch.
Books on RPA (Robotics Process Automation) that I mentioned in the webinar
Below are links to books I showed during the webinar. I put them into two groups (those I like/recommend and those I don’t). I’m more of a “glass is half-full” kind of guy and think technology is good. The books I don’t recommend were much more negativetowards technology. While I don’t recommend them, I think time will tell who is right/wrong. Personally any of the following you buy I’d try and buy as used. Many are pretty expensive new (probably because of the small market size)
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
Long Regular Expressions can be very difficult to read and revise when you come back to it later. Using the X) option allows you to Ignore Whitespace in AutoHotkey Regular Expression and insert comments as well as spread out your RegEx over multiple lines.
Below is the example code I use to ignore the whitespace in AutoHotkey RegEx which is demonstrated in the video below. It is a great way to make your code easier to read & maintain. It may take a few months until you revisit your RegEx but, when you do, you’ll thank me for it!
Ignore Whitespace in AutoHotkey Regular Expression