What are the best resources to learn RegEx?

I’m learning JavaScript through FCC, and I have worked on some changes where I made use of RegExp but I still feel the need to learn and understand it properly.

So what are some resources you’ve used in learning ?

3 Likes

This resource isn’t JavaScript specific. However, RegEx is much like any standard - or, as a more concrete comparison - much like SQL, where once you’ve learned RegEx itself - using it with any given programming language/environment is quite simple.

Therefore, I feel the best reference for learning RegEx is the book Mastering Regular Expressions. It’s language-agnostic (from what I can remember), and is an amazing resource for learning Regular Expressions. It’s how I sunk my teeth into them.

1 Like

I super-double +1 @christophercodin’s recommendation. Jeffrey Friedl’s book is how I learned – about 13 years ago, from an older edition. It is the book on regular expressions.

I found a couple of online resources that allow you to test your RegEx to see what it will return really useful. They probably aren’t the best way to learn from scratch but they are helpful to try out what you have learned.

https://regex101.com/#javascript
http://regexr.com/

1 Like

Do these crosswords https://regexcrossword.com/ and you will get it.

3 Likes

The site I’ve found most helpful is http://www.regexr.com/

2 Likes

I really like Regular Expression Cookbook by Goyvaerts & Leviathan (O’Reilly, 2012). Not only does it have a lot of good recipes that will come in handy (in all major flavours of regexes), but it also explains how they were derived.

Thanks a lot, is the best resource I’ve ever used up to now. I’ve learned more than the four last books I’ve read about this topic (maybe because before I have read them).

A certain conference by Leah Verou:

3 Likes

I found this awesome website that has helped me a ton :slight_smile:
http://regexone.com/lesson/letters_and_digits?

I’ve found http://www.regular-expressions.info/ and http://www.rexegg.com/ to be useful.

Additionally, using tools like www.regex101.com to help build regular expressions helps solidify concepts and usage of regular expressions, IMO.