Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-04-04 05:12:00


> In Boost::regex, is it possible (by setting flags) to set up a syntax
> which is like boost::regex::extended in that it finds the longest match,
> but which also supports non-marking brackets i.e. (? ... ) ?

Kind of: you need to compile the expression as a Perl regex, then pass
match_posix to the regex algorithm(s) to tell the matcher to find the
leftmost longest match. Be aware that POSIX matches tend to be quite a bit
slower than Perl style matches on the whole.

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