note 105275 added to function.preg-replace

From: Date: Sat, 06 Aug 2011 14:09:59 +0000
Subject: note 105275 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-182281@lists.php.net to get a copy of this message
output: April1, 2003 the example is wrong. try this, <?php $string = "April 15, 2003"; $pattern = "/(\w+)(\d+), (\d+)/i"; $replacement = "\${1}1,\$3"; // look at this print preg_replace($pattern, $replacement, $string); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 113.117.118.80 ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace.php Edit -- https://master.php.net/note/edit/105275 Del: integrated -- https://master.php.net/note/delete/105275/integrated Del: useless -- https://master.php.net/note/delete/105275/useless Del: bad code -- https://master.php.net/note/delete/105275/bad+code Del: spam -- https://master.php.net/note/delete/105275/spam Del: non-english -- https://master.php.net/note/delete/105275/non-english Del: in docs -- https://master.php.net/note/delete/105275/in+docs Del: other reasons-- https://master.php.net/note/delete/105275 Reject -- https://master.php.net/note/reject/105275 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#182281) next »