Does lookaround affect which languages can be matched by regular expressions?

Posted by sepp2k on Stack Overflow See other posts from Stack Overflow or by sepp2k
Published on 2010-06-04T12:44:20Z Indexed on 2010/06/06 21:32 UTC
Read the original article Hit count: 287

Filed under:
|
|

There are some features in modern regex engines which allow you to match languages that couldn't be matched without that feature. For example the following regex using back references matches the language of all strings that consist of a word that repeats itself: (.+)\1. This language is not regular and can't be matched by a regex, which does not use back references.

My question: Does lookaround also affect which languages can be matched by a regular expression? I.e. are there any languages that can be matched using lookaround, which couldn't be matched otherwise? If so, is this true for all flavors of lookaround (negative or positive lookahead or lookbehind) or just for some of them?

© Stack Overflow or respective owner

Related posts about regex

Related posts about lookahead