Greetings everyone!
My name is Ilya and i have such problem with boost::regex_replace :
I want to process some text messages to find and replace with * swears there.
I wrote regular expressions, this is an example of one of them:
"([[:punct:]]|[[:space:]]|[[:digit:]]|^)(?:a)(?:[[:punct:]]|[[:space:]]|[[:digit:]])*(?:b)(?:[[:punct:]]|[[:space:]]|[[:digit:]])*(?:c)([[:punct:]]|[[:space:]]|[[:digit:]]|$)".
The format string i used is:
"$1***$2"
Then i run boost::regex_replace() and it works almoust correctly, except one case: when i have message with abc's standing next to each other with one separator beetween them, like this:
"abc abc", "--abc-abc--" etc.
So i need to run boost::regex_replace() twice to process corectly such messages.
Are there any other ways to solve this problem?
Thank you for answers.
Ilya Bindiug