This. Also, I try to:
- use only those regex features that are cross-platform (cross-engine?)
- avoid `\w` and similar (what is word?) and instead use explicit rules (`[a-zA-Z]+`)
- use [] instead of backslashes when escaping (`[(]` instead of `\(`) - especially useful with double/triple escaping
- never use long regexes (there is always a better way)
I never understood why people are afraid of regular expressions.
That said, there are some performance/security implications wrt. backtracking that one should be aware of [0].
[0] https://javascript.info/regexp-catastrophic-backtracking