LWN.net Logo

RE2: a principled approach to regular expression matching

RE2: a principled approach to regular expression matching

Posted Dec 14, 2012 11:50 UTC (Fri) by geertj (subscriber, #4116)
Parent article: RE2: a principled approach to regular expression matching

No backreferences.... It would have been interesting to see a regular expression matching library that does not do backtracking but does support backreferences. Is there a proof that this is mathematically impossible?


(Log in to post comments)

RE2: a principled approach to regular expression matching

Posted Dec 14, 2012 19:20 UTC (Fri) by nybble41 (subscriber, #55106) [Link]

It may be possible to do that sort of match without backtracking, but it certainly wouldn't be a regular expression. The formal definition of a regular expression (concatenation /ab/, repetition /a*/, alternation /a|b/) precludes back-references.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds