[pcre-dev] [Bug 1337] New: Named Captures not working

Página superior
Eliminar este mensaje
Autor: Michael Baas
Fecha:  
A: pcre-dev
Asunto: [pcre-dev] [Bug 1337] New: Named Captures not working
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1337
           Summary: Named Captures not working
           Product: PCRE
           Version: 8.31
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: high
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: michael@???
                CC: pcre-dev@???



pls. have a look at the following PHP-program, where NONE of the named captures
are returned. I verified this match against the PCRE-Implementation in another
dev-environment (which was linked against 8.12) and it worked. When I reported
this as an issue in PHP, they told me to report here...

<?php


$QQ=chr(92) . chr(34);
$delimeters = "{}";
$del0 = preg_quote($delimeters{0});
$del1 = preg_quote($delimeters{1});
$tag="language";
$string="fdfdfdfdf{language=1}testhgg";
$preg = "~" . $del0 . $tag . "\s*=\s*(?P\'" . "quote\'[" . $QQ .
"\']*)(?P\'att\'>.*?)(?P=quote)\s*/" . $del1 . "~";
$match=array();
preg_match($preg,$string,$match);
echo "<br>string = " . htmlspecialchars($string) . "<br>preg=" .
htmlspecialchars($preg) . "<br>match:<pre>";var_dump($match);echo"</pre>";


?>


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email