
16 Dec
2008
16 Dec
'08
3:58 a.m.
Is there a way to get overlapping match results from Xpressive? For example, when searching for "aa" in the string "aaaa", I want three results [as]as, a[aa]a, and aa[aa]. Currently, I'm only getting the two non-overlapping results [aa]aa and aa[aa]. I tried the regex 'a' >> before('a'). That almost gave me what I wanted (three results with the correct positions). The problem is that the lengths are wrong. What I need are lengths that include the before() characters. Is that possible? I know in this simple example I could just add 1 to the lengths, but I'm looking for overlapping results on more complex regexes. Thanks, Dave Jenkins