I am trying to remove everything between two characters, including the two characters, from a string using regex in php. I tried using the answer on this page so now I have a line in my php file which looks like this :
$message = preg_replace('\[[^\]]*]', '', $message);
The problem is I get this error:
Warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash
How can I fix this?
preg_*functions in PHP.