From 8f3601c0b63677b712fd33c91b419581d45b5f56 Mon Sep 17 00:00:00 2001 From: Ron Chmara Date: Sat, 30 Sep 2000 20:00:30 +0000 Subject: [PATCH] Fixed example per errata. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@33203 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/pcre.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/pcre.xml b/functions/pcre.xml index 0e236b4a03..dc77d07d0e 100644 --- a/functions/pcre.xml +++ b/functions/pcre.xml @@ -363,9 +363,9 @@ part 3: </a> Replacing several values -$patterns = array ("/(19|20\d{2})-(\d{1,2})-(\d{1,2})/", +$patterns = array ("/(19|20)(\d{2})-(\d{1,2})-(\d{1,2})/", "/^\s*{(\w+)}\s*=/"); -$replace = array ("\\3/\\4/\\1", "$\\1 ="); +$replace = array ("\\3/\\4/\\1\\2", "$\\1 ="); print preg_replace ($patterns, $replace, "{startDate} = 1999-5-27");