preg_replace: how do I strip off all white space and ?
Posted: Fri Sep 24, 2010 11:46 am
Hi,
how do I strip off all white space and ?
I have this as a input in a wrapper I create,
bold
so before turning the text to bold, i want to strip off all white spaces and  , and turn it into bold,
but it does not work! can you help please?
Many thanks,
Lau
how do I strip off all white space and ?
I have this as a input in a wrapper I create,
bold
so before turning the text to bold, i want to strip off all white spaces and  , and turn it into bold,
Code: Select all
$this->content = preg_replace("/\[(.*?)\]\s\s+(.*?)\s\s+\[\/(.*?)\]/",
"[$1]$2[/$3]",
$this->content);Many thanks,
Lau