sebfisch / haskell-regexp

Regular Expression Matching in Haskell
http://sebfisch.github.com/haskell-regexp/
Other
34 stars 5 forks source link

backreferences #14

Open sebfisch opened 14 years ago

sebfisch commented 14 years ago

Some implementations support backreferences in regular expressions such that (.*)\1 matches mama and papa. Wikipedia claims that

[...] any implementation which allows the use of backreferences, or implements the various extensions introduced by Perl, must use a backtracking implementation.

It is unclear to me what other "extensions introduced by Perl" are meant here.

sebfisch commented 14 years ago

Maybe restricted backmatching can be adapted?