
8 Mar
2011
8 Mar
'11
5:45 p.m.
On 08/03/2011 18:09, S Nagre wrote:
Thanks a lot John for this, I changed my code to this and it worked..
boost::smatch what; while (boost::regex_search(startOffset ,endOffset , what, expression)) { int32 pos = what.position(); int32 len = what.length(); }
However, could you tell me how to do this if my input string is "Hello World, Hello". that is the reason I am using a while loop instead of an if since my input string can contain more than 1 search string.
I'd say startOffset += pos + len;