Hi...
I just can't figure out how to use regular expressions and preg_replace...
I need to above to echo "XXX" can someone please tell e the silly thing I am going wrong??
C
I just can't figure out how to use regular expressions and preg_replace...
Code:
$pattern = "[A-Z][a-z]+";
$replacement = "XXX";
$string = "Test";
echo preg_replace($patterns, $replacements, $string);
I need to above to echo "XXX" can someone please tell e the silly thing I am going wrong??
C