preg remove from string code example Example: php preg_replace function preg_replace($pattern, $replacement, $string);