Boost logo

Boost Users :

Subject: [Boost-users] [xpressive] Overlapping match results?
From: Dave Jenkins (david_at_[hidden])
Date: 2008-12-15 22:58:38


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net