There’s an old saying in computer science:
If you use regex to solve a problem, now you have two problems.
A regex, or Regular Expression, is a way of matching patterns in a string. Earlier this year, I shared a few videos from Steve Griffith on vanilla JS regex basics.
Regex can be really difficult, but jokes aside, sometimes it honestly is the best way to solve a problem.
One of the toughest things about using regex is figuring out what patterns to actually use to do what you’re trying to do.