Hello,
I try to get the contents behind the tag name.
www@mike:/home/www > /usr/local/bin/php -a
Interactive mode enabled
<?php
if (preg_match('<( ?:body|BODY)("[^"]*"|\'[^\']*\'|[^">\'])*>',
'<body bgcolor="#fffff f">',
$Match))
{
print($Match[1]);
}
else
{
print('No match!');
}
?>
X-Powered-By: PHP/4.2.3
Content-type: text/html
<br />
<b>Warning</b>: Unknown modifier ''' in <b>-</b> on line <b>11</b><br
/>
No match!
Why does this pattern not work?
I get more by the statements in the following programming language.
% info tclversion
8.3
% if [regexp {<(?:body|BODY) ("[^"]*"|'[^']*'|[^">'])*>} {<body
bgcolor="#fffff f">} X Match] \
{
puts "Match=$Mat ch"
} \
else \
{
puts {No match!}
}
Match="#ffffff"
Have you got an idea?
Best regards,
Markus Elfring
I try to get the contents behind the tag name.
www@mike:/home/www > /usr/local/bin/php -a
Interactive mode enabled
<?php
if (preg_match('<( ?:body|BODY)("[^"]*"|\'[^\']*\'|[^">\'])*>',
'<body bgcolor="#fffff f">',
$Match))
{
print($Match[1]);
}
else
{
print('No match!');
}
?>
X-Powered-By: PHP/4.2.3
Content-type: text/html
<br />
<b>Warning</b>: Unknown modifier ''' in <b>-</b> on line <b>11</b><br
/>
No match!
Why does this pattern not work?
I get more by the statements in the following programming language.
% info tclversion
8.3
% if [regexp {<(?:body|BODY) ("[^"]*"|'[^']*'|[^">'])*>} {<body
bgcolor="#fffff f">} X Match] \
{
puts "Match=$Mat ch"
} \
else \
{
puts {No match!}
}
Match="#ffffff"
Have you got an idea?
Best regards,
Markus Elfring
Comment