I'm trying to remove all whitespaces between:
[code/][code]
For example:
[code]http://stackoverflow.com/questions/ask[/code]
[code]http://stackoverflow.com/questions/ask[/code]
lorem ipsum
[code]http://stackoverflow.com/questions/ask[/code]
I want to get:
[code]http://stackoverflow.com/questions/ask[/code]
[code]http://stackoverflow.com/questions/ask[/code]
lorem ipsum
[code]http://stackoverflow.com/questions/ask[/code]
My code:
$string = preg_replace('@\[code\]\[(s+)\]\[\/code\]@si', '', $string);