Hello, i have a problem constructing a regular expression to strip out puntuations from a document.Below is a simple example of my code
#
//headers here
//...
string a="kennedy .really-really. .cool";
string replace=" ";
string newStr;
boost::regex expression("[ ]+(\\.)|(\\.)[ ]+",boost::regex::icase);
newStr=boost::regex_replace(a,expression,replace);
cout << newStr << endl;
//output
kennedy really-really .cool
//Expected output
kennedy really-really cool
I dont intend to remove puntuations between two word like "really-really" , "re-instal". How do i go about this?
Thanks in advance