Even if you're a regular expression pro, it's not always easy to know how to apply them in JavaScript. What's the difference between RegExp.prototype.exec and String.prototype.match ? What if I want to replace all punctuation followed multiple spaces with the same punctuation followed a single space? This workshop will explore the various methods and leave you with sample code, a cheat sheet, and the confidence to choose the right method for the job.
Prerequisites:
Node 12+
Array methods: map and filter
Knowledge of regular expression syntax helpful but not required
Workshop level:
JS devs who avoid regular expressions because who has time to figure out which method to use? Level: beginner / intermediate.
This workshop has been presented at JSNation Live 2021, check out the latest edition of this JavaScript Conference.
Comments