|
|
|
|
|
by Drup
2692 days ago
|
|
Except Perl 6 doesn't enforce it, so you have to guess yourself if you are really in the regular case. Additionally, PCRE used to be exponential for certain "bad cases", some of which were (truly) regular expressions. My point is simply that Perl doesn't give you any guarantee except "we will try to parse it". Maybe you will hit the right case for the right version of Perl, who knows ? The Web is full of DDOS attack based on exponential PCREs. With actual regular expression, the complexity is guaranteed. |
|
Perl 6 gives you pretty good control over where to use backtracking and where not. It parses regular languages with a NFA or DFA, and can switch to a backtracking engine.
More details in https://www.apress.com/us/book/9781484232279 (sorry for the plug, wrote it myself).