Re: Bug #13559: parser misinterprets ?> in a regexp

From: Date: Fri, 05 Oct 2001 10:47:39 +0000
Subject: Re: Bug #13559: parser misinterprets ?> in a regexp
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67333@lists.php.net to get a copy of this message
Afaik this is the normal behaviour. I'm used to workaround this with ...?".">.... - Markus On Fri, Oct 05, 2001 at 09:50:43AM -0000, cech@debian.org wrote : > From: cech@debian.org > Operating system: Debian > PHP version: 4.0.6 > PHP Bug Type: *General Issues > Bug description: parser misinterprets ?> in a regexp > > >From Debian bug #114345 > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=114345&repeatmerged=yes > > When presented with a perfectly valid regular expression that contains ?> > in > it, these characters are confused with those used to close a block of php > code > in the html file. > > Example: > > // $article = preg_replace("/<([^>]*)(\s+[^>]*)?>/s", > // '', > // $article); > > > Even though this entire block is commented out, I still get a parse > error due to the ?> in the regexp. > > The workaround seems to be use of the x modifier, and putting > whitespace between the ? and >, like so... > > $article = preg_replace("/<([^>]*)(\s+[^>]*)? >/xs", > > Mike > > ---------- > P.S. cannot there be a mail reportin interface? > -- > Edit bug report at: http://bugs.php.net/?id=13559&edit=1 > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Markus Fischer, http://guru.josefine.at/~mfischer/ EMail: mfischer@guru.josefine.at PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 -All your scripts are belong to Zend-

« previous php.dev (#67333) next »