php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24487 Preg_match and '# ... #x' delimiters
Submitted: 2003-07-03 11:44 UTC Modified: 2003-07-15 16:36 UTC
From: nightstorm at tlen dot pl Assigned:
Status: No Feedback Package: PCRE related
PHP Version: 5CVS-2003-07-03 (dev) OS: Mandrake Linux 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
17 + 10 = ?
Subscribe to this entry?

 
 [2003-07-03 11:44 UTC] nightstorm at tlen dot pl
Description:
------------
I've changed my PHP 5 alpha into PHP 5 beta 1 from cvs. And i've noticed that my template parser, which was written on PHP 5 alpha, didn't work. I analyzed the script and i've noticed that problem's with preg_match and preg_match_all instructions. They crashes, when the regular expression contains '#' and '#s', '#is', or other combinations - the browser shows the message that page cannot be found. When I remove or preg_match, or these '#' from the expression, everything works good. Probably someone changed some code in PCRE module, because the same code was working on PHP 5 ALPHA.

Reproduce code:
---------------
if(preg_match('#\{(.*?)\}#s', 'tralalalalala<html><hgkgkgk>compiled {BLOCK} tralalalah', $found)){
  echo '<pre>'; print_r($found); echo '</pre>';
}



Expected result:
----------------
<pre> .... print_r result .... </pre>

Actual result:
--------------
The browser (Galeon) shows that message (in a message window): "http://eniac.block22 couldn't be found. Please check the name and try again".

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-07 10:23 UTC] sniper@php.net
Works fine using latest CVS:

# php /home/jani/t.php
<pre>Array
(
    [0] => {BLOCK}
    [1] => BLOCK
)
</pre>

What was the configure line you used..?

 [2003-07-15 16:36 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat May 27 23:03:49 2023 UTC