[PHP]
<?php
$text='
<html dir="rtl">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p><a href="http://www.google.com/">gfsdfgsdgdsfg sdgsfd</a></p>
<p>aasdfasfasfa sf</p>
<p>fasfasfasfsa d</p>
<p>sdfaafdadsfs dfa</p>
<p><A href=http://www.orkut.com/>
<img border="0" src="file:///D:/My%20Documents/My%20Pictures/mohsen.jpg"
width="480" height="640"></a></p>
</body>
</html>';
//$text='<a href="http://www.google.com/">gfsdfgsdgdsfg sdgsfd</a> <a
href="http://www.orkut.com/">';
preg_match_all( '/(<a *href *=)(["\']*)(http:\/\/[^"=
]*)(["\']*)(>)/',$text,$matche s,PREG_PATTERN_ ORDER);
print_r($matche s);
?>
[/PHP]
it can find just one of two match string in text (<a
href="http://www.google.com/">). but after several tests, and after i put
two match strings in one line :
[PHP]
$text='<a href="http://www.google.com/">gfsdfgsdgdsfg sdgsfd</a> <a
href="http://www.orkut.com/">';
[/PHP]
it could find both of them! it think the reason of this problem is
multiline.
therefore i have a questoin. is regex functions in php can support
multiline texts?
many thanks
(sorry for my bad english)