Python support for "irregular" expressions
Python support for "irregular" expressions
Posted Feb 23, 2022 8:23 UTC (Wed) by marcH (subscriber, #57642)In reply to: Python support for "irregular" expressions by brenns10
Parent article: Python support for regular expressions
> As can be seen, regular expressions are a powerful mechanism, but they are complex, can be used inappropriately, and are prone to bugs of various sorts; they are also difficult to test fully and to debug when problems are encountered. [...] They are useful tools, and _started_ life as pretty simple things, with small, elegant, and efficient implementations Feature creep and "faster! faster! faster!" turned the implementations more into bottomless pits now ;-)
and:
> Those who need timeouts, atomic groups, nested character sets, possessive quantifiers, and other advanced footguns ...
Although "timeouts" look more like a security fix than an advanced feature.
Posted Feb 26, 2022 7:22 UTC (Sat)
by flussence (guest, #85566)
[Link] (1 responses)
More of a lesson everyone keeps relearning the hard way; PHP got it right 25 years ago, and it stings every time another system for processing arbitrary code+data on the fly gets it wrong (regex, SQL, shaders, CSS, ...)
Posted Feb 27, 2022 21:06 UTC (Sun)
by marcH (subscriber, #57642)
[Link]
Python support for "irregular" expressions
Python support for "irregular" expressions