A primer on Regex
April 23, 2013
If you’re like me and you’ve relied on regex to quickly solve the odd search problem and string mashing, but haven’t really made use of some of the shortcuts and optimizations, then I recommend giving this video a shot (thanks to smashing magazine for tweeting this video). She provides a decent breakdown behind the logic in tackling problems with regular expressions, including if you should use them at all. There’s also skill testing questions throughout which are a fun challenge as you go.
A few more resources to keep you going after the video:
- A handy cheat sheet
- Regular expressions book, with exercises
- Regex source code if you’re even more curious (scroll down a bit on page)
If you have any regular expression resources / learning suggestions feel free to leave them in the comments. Thanks!
Also, a thanks to smashing magazine for tweeting this useful video, follow them: @smashingmag
[Update] Found that this tool can be pretty handy for live testing, practicing regular expressions (specifically for PHP). Gives you the resulting function with parameters to use, too.