Re: regex questions
| From: | Christian Reiniger | Date: | Wed, 11 Jul 2001 04:37:24 +0000 |
| Subject: | Re: regex questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57305@lists.php.net to get a copy of this message | ||
On Tuesday 10 July 2001 23:04, Jerry Lake wrote:
> the only pattern that they share is
> that the end of the line ends with a number,
> quotes and a closing bracket i.e. 7">
> I can match that pattern, with .\d"> but
> when I try to replace it, I also replace
> the number at the end, and not just append
> the line like I want to.
Let the pattern remember it:
$bar = preg_replace ('/(\d)">/', '\1"/>', $foo);
--
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)
I saw God --------- and she was black.