note 84657 modified in function.mb-ereg-replace by danbrown
| From: | danbrown@php.net | Date: | Thu, 24 Jul 2008 13:20:00 +0000 |
| Subject: | note 84657 modified in function.mb-ereg-replace by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142645@lists.php.net to get a copy of this message | ||
<?php
$pattern = "([ã-ã]+)[0-9]+";
$string = mb_ereg_replace($pattern, 'ã\\1ã:\\0', $string);
?>
you can use \\n for capture group in replacement
--was--
$pattern = "([ã-ã]+)[0-9]+";
$string = mb_ereg_replace($pattern, 'ã\\1ã:\\0', $string);
you can use \\n for capture group in replacement
http://php.net/manual/en/function.mb-ereg-replace.php