?php $str = "April 15, 2003"; $pattern =" / (\w+) (\d+), (\d+) / i"; $replacement = "\${1}1,\$3"; print preg_replace($pattern, $replacement, $string); / * Output ====== April1,2003 * /?
예 1. Using backreferences followed by numeric literals.