I am parsing one input file which has following content.
<tr>
<th width="50%">ABC</th><th width="50%">XYZ</th>
</tr>
<tr>
<tr>
<td>avc</td>
<td>fds</td>
</tr>
code:
#!/usr/bin/perl
open(fh,$ARGV[0]) or die "could not open a file\n";
$input=<fh>
#print($input)
if($input =~ /<tr>(\n)?(.*)(\n)?tr>/)
{
print($1);
}
But there is no output. How to get middle line having th tag?