I have a big string that is a combination of many blocks (chunks) of data:
{Hello user, good morning \br}{Welcome user, this is just a static text, continue to next page}{Hope you are doing well \br enjoy your stay here.}
What i would like to do is, to remove the chunks from it, that contain a specific character set: \br
.
So the above string should be:
{Welcome user, this is just a static text, continue to next page}
I have tried preg_replace, without luck:
$a = "{Hello user, good morning \br}{Welcome user, this is just a static text \br continue to next page}{Hope you are doing well \br enjoy your stay here.}";
$b = preg_replace('/\s+\br\s+/', "", $a);
print $b;