Learn Regular expressions
A compact pattern language for searching, validating and rewriting text
Regular expressions describe sets of strings with a few dozen symbols, and nearly every language, editor and command-line tool supports them. Learn them once to search code, extract fields from logs, validate input and do bulk search-and-replace, and learn their limits so they never become a bug or a security hole.
How deep do you want to go?
1. EssentialsRead and write simple code, do the everyday basics
2. PracticalUse it productively at work, with the usual idioms
3. AdvancedThe less common features, performance and trade-offs
4. ExpertInternals and the edge cases experts know