i was trying to grab some data from a horsing data site http://www.hkjc.com/english/racing/horse.asp?horseno=P278
basically i wget the above URl and loop thru each line of the HTML source code and check if the line match regular expression, if it does, i grab some data and store it in a variable
example of the source (it should be in line 384-386):
<td class=htable_eng_text align=center>
2
</td>
I was trying to match the digit "2" but i failed
i did something like this:
if ($line =~ /\s+([1-12])\s+/) {
#if match, then stored $1 in a variable
}
Here's my questions: not sure if i should add \s+ at the end and not sure if i could do ([1-12]) as the digit i want to grab in a range of 1-12 (i also try (\d||11||12)) but failed)...
i m new to perl and hope someone could help. Thank you!!!