Ratings11
Average rating4.4
Mwah, mwah! Thank you, Jeff Friedl, for finally - FINALLY - demystifying this most crucial of meta-programming skills: regular expressions. I had tried online tutorials, videos, even a retro bash game, this and that. Nothing ever helped. This did. FINALLY. FINALLY!
So I didn't “read” the whole book, but whatever, the second half is reference material for languages I never use nor plan to use (Perl, PHP, etc.). Honestly, the first 2-3 chapters were sufficient; once he got into the guts of different regex languages, I felt like I was teleported back to 1983 Bay Area, sitting next to Steve Wozniak as he pecked at his clackety-clack keyboard and wrote the original BSD man pages. Awwww myyyannn, I just did man grep
to double-check my facts and DAMMIT the last update to the grep man page was 2010!!!! Way to kill my joke, Unix.
Henyyyway. Highly recommended, though YMMV - people learn in diff ways. I had been daunted by regexes since the 2009 Stata days, and I just WISH I had had this then.
For my future reference (and yours), a muscle must be exercised, and here are some regex games:
- https://alf.nu/RegexGolf
- https://regexcrossword.com/
- https://www.hackerrank.com/dashboard has a bunch
- https://github.com/bchartoff/regexcalibur (the bash game)
I read the first edition many years ago and while I don't remember the contents in detail, I get the impression that this edition has a much smoother opening than its predecessor, and is thus an easier book to read for less experienced programmers. The first few chapters teach the core techniques, with could recaps and summaries, as well as a lot of useful examples.
The second half of the book is much more advanced and focuses more on the technical aspects of regex engines, ways of maximizing efficiency in regular expressions and chapters on the implementation of regular expressions in various programming languages, including Perl, Java, and PHP.
It is really a classic work and a must for anyone who wants to learn how to think about regular expressions instead of just viewing a list of metacharacters found in a language documentation file.
A great book for those interested in the intricacies and power of regular expressions, especially perl compatible ones.