language-theory

The recognizing power of “modern” regexes

妖精的绣舞 提交于 2019-11-25 23:36:45
问题 What class of languages do real modern regexes actually recognise? Whenever there is an unbounded length capturing group with a back-reference (e.g. (.*)_\\1 ) a regex is now matching a non-regular language. But this, on its own, isn\'t enough to match something like S ::= \'(\' S \')\' | ε — the context-free language of matching pairs of parens. Recursive regexes (which are new to me, but I am assured exist in Perl and PCRE) appear to recognize at least most CFLs. Has anyone done or read any