in my website i want to replace links with some other link like this
www.abc.com
or http://abc.com
will be replaced with
http:/
There is few ways to solve that
Escaping "/"
$search_array = array(
"/\[url]www|http:\/\/.([^'\"]*)\[\/url]/iU",
"/\[url]([^'\"]*)\[\/url]/iU",
"/\[url=www|http:\/\/.([^'\"\s]*)](.*)\[\/url]/iU",
"/\[url=([^'\"\s]*)](.*)\[\/url]/iU"
);
Or using different regexp seperator like "#"
$search_array = array(
"#\[url]www|http://.([^'\"]*)\[\/url]#iU",
"#\[url]([^'\"]*)\[\/url]#iU",
"#\[url=www|http://.([^'\"\s]*)](.*)\[\/url]#iU",
"#\[url=([^'\"\s]*)](.*)\[\/url]#iU"
);