I've blatantly stolen John Gruber's regular expression for matching URL's which is the best I've tried.
A tiny feature of Keyboard Maestro that I rarely (if ever) see used is the regular expression matching and the regex replacement token in the search and replace actions. It's a fairly powerful way to do on-the-fly text conversion. It follows the standard regular expression back reference syntax1 where "$1" is the first match.
Here's the macro:
Here's the gorgeous Gruber regex:
I can grab any text that contains URL's and instantly convert them to image links, while leaving all other text in place. For example, this block of text:
Is converted to this block:
I'm way out of my depth with regex. I'm probably talking bollocks. Hey, what's new? ↩