Re: string matching doesn't work



On Nov 1, 3:47 pm, "Dr.Ruud" <rvtol+n...@xxxxxxxxxxxx> wrote:
Jack schreef:

if (@content =~ m/<h1>Mr.*<\/h1>/){
print "here " . $1;
}

$ perl -le'
# use warnings;
@c = qw(abc de fghi);
if (@c =~ /([bdg0-9])/) {
print $1;
}
'
3

--
Affijn, Ruud

"Gewoon is een tijger."



I used Mirco Wahab's solution and it worked for some of the cases but
now I am stuck at parsing this line.

<td class="profile">Address<br>City&nbsp;State&nbsp;&nbsp;V2X
6J3<br>Canada<br>

</td><td align="right" class="profile"><nobr><b>Phone: </
b>555-555-5555</nobr>&nbsp;
</td>


I want to parse each section into a variable using qr. so for the
Address I used
<td[^>]+> ([^<]+) <br> # this line works fine and I get the address
portion
.+?
<br> ([^&]+) &nbsp\; # this part doesn't work meaning that I
don't get anything for city

Any help would much appreciated.

.



Relevant Pages