Are Perl regexes turing complete?

前端 未结 3 1730
Happy的楠姐
Happy的楠姐 2020-12-04 23:06

I\'ve seen Ruby and Perl programmers do some complicated code challenges entirely with regexes. The lookahead and lookbehind capabilities in Perl regexes make them more powe

3条回答
  •  鱼传尺愫
    2020-12-05 00:05

    There are at least two discussions: Turing completeness and regular expressions and Are Perl patterns universal? with further references.

    The consensus (to my untrained eye) seems to be that the answer is "no", but I am not sure if I understand everything correctly.

提交回复
热议问题