php regex replace function code example Example: php preg_replace function preg_replace($pattern, $replacement, $string);