Re: note 8322 added to ereg
| From: | J. M. Castagnetto | Date: | Wed, 06 Sep 2000 18:30:29 +0000 |
| Subject: | Re: note 8322 added to ereg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4262@lists.php.net to get a copy of this message | ||
Martin,
The annotations are not meant to be used to ask
support questions. Yours has to do with the
*greediness* of the regex engine, try a more specific
regex or use PCRE functions.
Go to the PHP general list to ask support questions
(see info at www.php.net/support.php)
--- martin@hkhotmail.com wrote:
> Question about hit one then escape:
> Surpose the src string like that<br>
> $src =
> '....<tag1>tag1</tag><tag2>tag2</tag>....'<br>
> and want to get tag1, tag2<br>
> I tried use pattern:<br>
> $pattern = $starttag.'.+'.$endtag /*
> $starttag='<tag1>' and $endtag='</tag>' */ <br>
> then use <br>
> eregi($pattern, $src, $match) to find it<br>
> But it match whole string the end tag of tag2 also
> '</tag>'<br>
>
> Can eregi had option that to hit one and then
> escape?<br>
> P.S. I tried use $pictags.'.+'.$endtag.'[^.*]', but
> not work<br>
> Great thx
>
> http://www.php.net/manual/function.ereg.php
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/