I would be interested to know which algorithms are used to match it and how they are optimized, because I imagine that somes regexes can create a huge number of possible matches that can cause serious problems with a poorly-worn regular expression parser.
Also, I recently discovered the ReDoS concept, why are regular expressions like (a|aa)+ or (a|a?)+ Causing problems?
EDIT: I used them most in C # and Python, so that was in my mind when I considered the question. I assume Python is written in C like all other interpreters, but I have no idea about C #
source share