I have this message (without the quotes, it's just for being precise):
"hey, here i am<br /><br />
"
Note the white space after the line break. So here's the thing: I'm trying to remove all the invisible chars and the <br />
of the message, all of them at the end of the message, with a regex to have something like "hey, here I am". But I must do something wrong because I can't make it work. That's what I tried:
$content = preg_replace('{(<br(\s*/)?>| |\r\n|\r|\n| )+$}i', '', $content);
But the message remains the same at the end. Must be something simple I missed. Thank you for your help!