What I require is to replace \/:"?<*>| with a space.
I have done similar statements before but I have complete brain freeze at the moment. Hoping one of you can jog my memory. Always hated regex expressions never understood the logic behind them minus the A-Z and 0-9 and then all the brackets, etc. Blah!
$pattern = // This where I require the regex expression $replacement = " "; $string = "a\b/c:d*e?f"g<h>i|j"; $test_string = preg_replace($pattern, $replacement, $string); echo $test_string;