After reading the great book Mastering Regular Expressions by Jeffrey Friedl, I tried to find a good cheatsheet about regular expressions, but I could not find one showing all the things I wanted to remember, or have at hand, from this book. So I wrote my own.
You can get the latest version of the document here.
You will see it is not just a cheatsheet, as it brings more useful information for quick reference. The document is divided in the following sections:
- Basics (a cheatsheet)
- Advanced (another cheatsheet)
- Special Characters (another, very specific, cheatsheet)
- Efficiency (another cheatsheet, focused on efficiency)
- Examples (two pages of very useful examples for real-life problems)
- Usage in Programming Languages and Tools (examples on different languages and tools)
If you want to really understand what is shown in this document (and much more!) you have to read Friedl's book.
After cloning this repository, you will need the following tools to build the document:
- make (You will need the GNU version, which is the default in GNU/Linux and Mac OS X)
- sed (both GNU and BSD versions should work)
- TeXLive
Once you have all this, just run:
make clean
make