Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-07-05 11:20:45


Chandan Nilange wrote:
> Hello,
>
> Can boost_regex handle overlapping matches.
>
> e.g
> RegularExpression=> "12345678901\\d"
> String=> "12345678901123456789012"
>
> Should generate following 2 Matches:
> 1st Matching Pattern:123456789011
> Pattern starts at :0
> Pattern ends at: 11
> Pattern length:12
> 2nd Matching Pattern:123456789012
> Pattern starts at :11
> Pattern ends at: 22
> Pattern length:12
>
> I know, the documention talks only about
> non-overlapping matches.
> Just want to know if overlapping-matches support is
> likely to be added to boost_regex.

It's not explicitly handled, but it's more or less trivial to use
regex_search to repeatedly search for overlapping matches.

John.


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