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
www.abc.com
http://abc.com
http:/
"/\[url]www|http://.([^'\"]*)\[\/url]/iU", ^ ^^ ^
You either need to escape the two // in the middle to \/\/, or, better, use different delimiters for the regex:
//
\/\/
"~\[url]www|http://.([^'\"]*)\[/url]~iU",