The Friday Fillip
\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b
Ever searched for one?
We’re used to searching the internet or databases for documents, making good use of Boolean search logic or its local variant I hope. But how good are we at searching within a document for a particular kind of text string or location?
What you see above is a series of “regular expressions” (or regexes) that will find you any email address within a text, at least if searched for with a “regular expression engine.”
Regular expressions aren’t easy to learn, but if you like constructing precise searches, or if you have to search and replace terms in a document that are not straightforward, you may find yourself motivated to try.
If you do — find yourself motivated, that is — take a look at regular-expressions.info. There’s a decent tutorial there to get you started.
Now you know how I built my RSS Feeds! :-) Without replacing curly quotes and apostrophes, I couldn’t get the XML to validate. Thank-you regex! Lots of great applications out there…