Boost logo

Boost Users :

Subject: Re: [Boost-users] [Regex] Accessing match count
From: ninti_at_[hidden]
Date: 2010-03-11 21:07:59


Thanks Gevorg, that worked a treat.
 
Actually, I don't really need the count as a string so this worked even better:
 
return std::distance( boost::sregex_iterator( word.begin(), word.end(), expression ), boost::sregex_iterator() );
 
First time I've seen std::distance. Sigh, so much to learn ... :-)
 
Mick


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