[TRE-general] libtre capture nonsense
Ville Laurikari
ville at laurikari.net
Wed Feb 21 07:40:45 EET 2007
On Tue, Feb 20, 2007 at 08:28:53PM +0200, Shmuel Zeigerman wrote:
> Hello,
>
> > regex: (a|ab|aba|baab)*
> > The string "abaab" can be matched in different ways:
[clip]
> > When your tagged DFA has consumed the last character, how does it
> > determine that the submatch to return is "ab", and not "baab"?
>
> Probably I'm doing something wrong, but my test with TRE 0.7.5
> returns the submatch "baab".
No, you're not doing anything wrong. This is a known issue in TRE.
In a case like this, TRE always returns the longest possible last
match for the repeat.
--
http://www.iki.fi/vl/
More information about the TRE-general
mailing list