Regular Expression
| From: | Joshua | Date: | Sat, 27 Dec 2003 17:47:04 +0000 |
| Subject: | Regular Expression | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173379@lists.php.net to get a copy of this message | ||
Hi all,
I'm trying to change the string, for example,
$string = "11.abcd.32.efgh.53.ijk";
to
11.abcd.
32.efgh.
53.ijk.
with ereg_replace.
Like
ereg_replace("\.[0-9]","<BR>",$string);
How can I recover the original characters
after replacing them with <BR>
in ereg_replace?
ereg_replace("\.[0-9]","<BR>\\0",$string) gives me the
wrong result like:
11.abcd.
32.efgh.
53.ijk.
thank you in advance.
Joshua