C++ shame corner (little help please)

Yeah, if there’s an easy way to step through a string and identify a pattern without a regex, I always prefer that.

Regexes are sort of a last resort “well, the pattern is complicated and not easy to parse”, and even then, you probably want to do a few sanity checks before applying one.

It’s very easy to make a poorly performing regex, they’re hard to reason about, and they’re hard to maintain and update.

1 Like