TBF, using regexes in an interpreted language (such as Bash, JS, and Perl) is not bad, because the performance of a parser in such a lang is typically the same (or worse) than a pre-compiled regex.
However, for compiled langs, the optimizer is much likely to understand simple source-code than a state-machine parser-compiler-runtime-engine. Regex should only be used if it must be dynamically generated, not when the expression is constant
TBF, using regexes in an interpreted language (such as Bash, JS, and Perl) is not bad, because the performance of a parser in such a lang is typically the same (or worse) than a pre-compiled regex.
However, for compiled langs, the optimizer is much likely to understand simple source-code than a state-machine parser-compiler-runtime-engine. Regex should only be used if it must be dynamically generated, not when the expression is
constant