Regular expressions provide a declarative language to match patterns within strings.

- Stackoverflow.com Wiki
12 articles, 4 books. Go to books ↓

Regular expressions are powerful, but with great power comes great responsibility. Because of the way most regex engines work, it is surprisingly easy to construct a regular expression that can take a very long time to run.


If you want to use regular expressions in production code the most important thing you must know about how these things are matched is that there are three general approaches to doing it. They have different performance characteristics and it is absolutely vital that you know which approach the library you are using implements.


Regular expressions are a way to describe patterns in string data. They are an incredibly strange yet useful tool in JavaScript and many other programming languages. Understanding regular expressions will allow you to traverse its complex syntax and become a much more effective programmer.


Regular expressions can be tricky to write and downright impossible to read. They can also be incredibly useful. Striking a balance between power and legibility is achievable. Here are five of the best ways I know to do it.


A look at regular expressions in and after ES6. There’s a couple of regular expressions flags which were introduced in ES6: the /y or sticky flag, and the /u or Unicode flag.


Free books

Regular Expressions

Regular Expressions

Callum Macrae