Boost logo

Boost Users :

Subject: Re: [Boost-users] Help needed in creating Regex...
From: Arash Partow (arash_at_[hidden])
Date: 2012-01-11 19:44:58

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..

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at