You only have to the bordering forward slashes in the preg() functions (perl regular expression).
$string = preg_replace("/pattern/i", "replacement", $string);
in perl, this is formed like:
$string =~ s/pattern/replacement/i;
The i means case-insensitive. The slashes are there to keep with the perl roots and provide a place for those parameters.