12 Jan
2012
12 Jan
'12
12:44 a.m.
Subhash Nagre wrote:
Hi everyone, I need a help in creating a regular expression, I need to select only "Sentences" in String using Regex so I wrote the Code ..
*boost::regex re( "(\\S.+?[.!?])(?=\\s+|$)" );*
Wouldn't it be easier and far more efficient to use boost split and provide a stateful delimiter, that keeps track of the last 3 chars encountered, and does not return true upon encountering a "." if the last 3 or 2 chars match any of the following sequences: Dr,Mr,Mrs etc..