another REGEX question
| From: | Julian Simpson | Date: | Thu, 02 Aug 2001 21:15:35 +0000 |
| Subject: | another REGEX question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-60995@lists.php.net to get a copy of this message | ||
I have a string can look like either of the following:
<p>some stuff</p>
<p align = "left">some stuff</p>
I want to use eregi_replace to take out the first p tag whether it be <p> or <p
align......> with a space
I assumed that $str = eregi_replace ("<p.*>", " ",$str);
but it matches the entire string and thus turns the whole string into one space.
aparently regex will match the biggest possible match rather than the smallest
my question is how do i get it to match the smallest.
thanx in advance..
Julian