Regexes Got Good: The History And Future Of Regular Expressions In JavaScript

August 22, 2024

In this article, I’ll recount the history of improvements to JavaScript regexes (spoiler: ES2018 and ES2024 changed the game), show examples of modern regex features in action, introduce you to a lightweight JavaScript library that makes JavaScript stand alongside or surpass other modern regex flavors, and end with a preview of active proposals that will continue to improve regexes in future versions of JavaScript (with some of them already working in your browser today).

Source: Regexes Got Good: The History And Future Of Regular Expressions In JavaScript — Smashing Magazine

Despite learning about (though never really learning) regular expressions in first year at University (a long time ago folks) I suspect like many (most? almost all?) folks I never moved beyond the most rudimentary working knowledge and searching for solutions when I had a use case in mind (and now using ChatGPT).

But they are powerful and valuable and have improved significantly in JavaScript in recent years. Just don’t use them to parse HTML ok?