8 Jan
2010
8 Jan
'10
12:21 a.m.
On Jan 7, 2010, at 5:01 PM, K. Noel Belcourt wrote:
Hi,
I have a search for a regular expression like this.
sregex_iterator cur(buffer.begin(), buffer.end(), defined_re), end; for(; cur != end; ++cur) { ...
But what I really want to do is perform a new regex search starting at the location in the buffer marking the end of the previous search. Is there a way to get the buffer index from the previous search so I can start the new search past the previous search?
Okay, seems like you can use: smatch const &what = *cur; what.position(); to give you the byte offset into the buffer. -- Noel