I spent three hours last week debugging a JSON parser I wrote with regex. It worked on ten test cases, failed on the eleventh, and the fix broke cases three and seven. I could have avoided the whole thing by using a proper parser from the start. So could a lot of people who reach for regex as the default hammer.
Regex is great at finding patterns in text. It is terrible at understanding structure. The difference matters once your input has nesting, optional fields, or anything that can appear in more than one position.
A quick rule of thumb: if your data has a formal grammar (JSON, XML, CSV with quoted fields, SQL), use a parser. If you're extracting phone numbers from a free-text field, regex is fine. The border is roughly does the format have a spec? If yes, someone already wrote a parser for it. Use that.
The other trap is trying to validate with regex. Matching an email address with a regex is a classic example. You can get 90% of the way there in ten minutes, and the last 10% will take you the rest of the afternoon. Meanwhile, sending a confirmation email and waiting for the click validates the address perfectly in zero lines of regex.
None of this is new advice. But I keep seeing smart people burn hours on regex that should have been a three-line library call. Sometimes the right tool is the boring one.