regular expressions problem
I want replace all occurances of " dot " by .<br />
I used this code
$clean_db_text = str_replace(".", ".<br />", $clean_db_text);
But , it caused problems , when it find www.domain.com , It replaces them.I don't need that . I only want any other dot to be replaced.
I tried :
$pattern = "[^www]\.[^com]";
$replace = ".<br />";
$clean_db_text = preg_replace($pattern, $replace, $clean_db_text);
But I got the following error :
Warning: preg_replace(): Unknown modifier '\' in D:\xampp\htdocs\alaa\test_regex.php on line 16
Can someone help ?