What are the best resources to learn RegEx?

What are the best resources to learn RegEx?
0

#1

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 ?


#2

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.


#3

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.


#4

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/


#5

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


#6

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


#7

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.


#8

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).


#9

A certain conference by Leah Verou:


#10

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


#11

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.