Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-08-17 14:11:42


Venkat Rangan wrote:
> Hi,
>
> Is there an option to regex_search() to limit the string it searches
> to a certain number of non-NULL characters? Although it is possible
> to make a copy and null-terminate, we would like to avoid that copy.

Yes, don't pass a single const char*, but a pair of iterators: a pair of
const char*'s will do just fine if that's the data type you have to hand -
the first will point to the start of the string, the second to the point
where you want searching to stop.

HTH, 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