Does anybody know how can we extract string in multiple lines using preg_match_all
I have tried to extract the input tag to get. If the inout tag is with single line it works but if it goes to second line it does not work and gain I used the multiline modifier /m also . Still it does not work. Does nay body have any idea. The ´code I have used to extract the multiple line of input tag, i have written below
<?
$allPage2=\' <input type=\"text\"
name=\"class\" size=\"20\"> abaccfda<b>
<input type=\"text\" name=\"name\" size=\"20\">\';
$allPage2=str_replace(\"\n\",\"\",$allPage2);
highlight_string($allPage2);
preg_match_all(\"|<input.type=\\"([>].)\\".name=\\"([>].)\\"(.*)+>|m\",$allPage2,$matches);
print(\"<br>There are\".count($matches[0]).\"matches found<br>\");
print(\"<br>ALL page 2 matching\");
for ($i=0; $i< count($matches[0]); $i++)
{
print(\"match[0][\".$i.\"] is \");
highlight_string($matches[0][$i]);
// $matches[0][$i]=str_replace(\"\n\",\"\",$matches[0][$i]);
}
?>
If I put $allPage2 in the single line, then it works. pls answer