Regular expressions (or regex for short) are the Swiss army knife of string searching and manipulation, a cure against cascades of conditions and ugly loops. However, some folks also in the software developer herd still consider them hard to learn and thus keep their hands off. Big mistake!
Here are a few helpful resources for learning regex:
And finally our handy and colorful cheat sheet:
Please keep in mind that although many programming languages and text editors implement regex nowadays, the actual implementation may differ. Expressions using niftier features are generally more likely not to work in a different environment.
And make sure you have fully understood the concept of "greediness" because if you haven't, you'll end up with way too large, slow and buggy expressions - promised!