RE: [PHP] REG_BADRPT error for regex
| From: | Boget, Chris | Date: | Wed, 12 Jul 2000 16:21:50 +0000 |
| Subject: | RE: [PHP] REG_BADRPT error for regex | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6176@lists.php.net to get a copy of this message | ||
> > eregi( "<rec>.*?<\/rec>", $news, $newsRecs );
> > How is "<\/rec>" not a 'valid basic or extended regular
> > expression'?
> > I'm using PHP3.0.5 so I cannot use the preg() functions and I
> > really need to get some sort of regex that does what I need; some-
> > thing that the regex above should be able to do.
> > Is there a work around? Or something?
> You're trying to use non-greedy syntax (.*?) in POSIX regexps which do
> not support it. You're stuck unless you use preg_*() functions.
So in other words, unless I upgrade from the version we are using
now (3.0.5; I've tried talking them into upgrading. :/), I'm going
to have to use some sort of work around, most likely using instr()
(or substr() or whatever the function is, I cannot recall)?
Man, that bites.
Thanks for the info.
Chris