note 84657 modified in function.mb-ereg-replace by danbrown

From: 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

« previous php.notes (#142645) next »