lamuguo / re2

Automatically exported from code.google.com/p/re2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

feature: lookahead and lookbehind #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was just wondering why such an awesome engine does not support look-ahead and 
look-behind. The automata theory does allow this without any overhead (it is 
only needed to generate a new sub-automaton). Actually it would make the 
overall complexity non-linear, but only for regexps using these 
look-(ahead|behind) empty strings.

Are there any plans to incorporate support for this?

Original issue reported on code.google.com by dumb...@gmail.com on 23 Apr 2013 at 7:47

GoogleCodeExporter commented 9 years ago
There are no plans. It can be done linearly with extra space. But I still would 
prefer to find a way to do it better if we're going to do it.

Original comment by rsc@golang.org on 10 Jan 2014 at 1:31

GoogleCodeExporter commented 9 years ago

Original comment by rsc@golang.org on 10 Jan 2014 at 3:25

GoogleCodeExporter commented 9 years ago
Do you or anyone else have at least a slight idea how to do it better? I'm out 
of my creativity :(.

Anyway, I'm certain, the implementation of sub-automatons would be pretty 
straightforward.

Original comment by dumb...@gmail.com on 10 Jan 2014 at 3:35

GoogleCodeExporter commented 9 years ago
RE2 has moved to GitHub. I have not moved the issues over. If this issue is 
still important to you, please file a new one at 
https://github.com/google/re2/issues. Thank you.

Original comment by rsc@golang.org on 11 Dec 2014 at 4:45