I have the following regular expression:
$url = "http://example.com?param=test1\test2\test3\test4";
$cleanUrl = preg_replace('|[^a-z0-9-~+_.?\[\]\^#=!&;,/:%@$\|*`\'<>"()\\x80-\\xff\{\}]|i', '', $url);
I get the following output:
But, I'm expecting the following output:
http://example.com?param=test1\test2\test3\test4
I tried to this regex, but it's not working:
$cleanUrl = preg_replace('|[^a-z0-9-~+_.?\[\]\^\\#=!&;,/:%@$\|*`\'<>"()\\x80-\\xff\{\}]|i', '', $url);
^ escaped single quote