http://qs321.pair.com?node_id=803227


in reply to Re: check for power of a number with regex
in thread check for power of a number with regex

Because 5.10 regular expressions have named captures you can use as rules, languages not being regular doesn't mean they cannot be matched by a Perl regexp. With named captures and rules, Perl regexes can match any context-free grammar. With backreferences, even more.

Now, I don't think the language {1n | n = bc, c > 1} is context-free, but that's harder to prove than it being non-regular. And it's still not sufficient to prove it cannot be matched by a Perl regexp without the use of (?{ }) or (??{ }).