With the exception of any inline code, such as ?{ } , They probably do not cover all context-free, and especially Turing Machines. They can, but as far as I know, no one has proven it anyway. Given that people have been trying for some time to solve some context-related issues with Perl regular expressions and have not yet come up with a solution, it is likely that they are not context-sensitive.
There is an interesting discussion about which features are just convenient, and which actually add strength. For example, matching 0 n * 1 * 0 n (this is a notation for "any number of zeros followed by one followed by the same number of zeros as before") is not something that can be done with pure regular expressions . You can prove that this cannot be done with regular expressions using the pump lemma, but a simple, informal proof is that the regular expression should count an arbitrary number of zeros, and regular expressions cannot count.
However, backlinks may correspond to those:
/(0*) 1 \1/x;
So, this means that backlinks give you more energy and more than convenience. What else can give us more strength, interesting?
In addition, Perl6 โpatternsโ (they donโt even pretend that they are regular expressions) are designed to look like Perl5 regexes (so you donโt have to retrain a lot), but they have enough additional functions that are completely contextual free. They are actually designed so that you can use them to change the way you analyze in the lexical field.
frezik Nov 02 2018-11-11T00: 00Z
source share