I need to read many HTML files containing similar structure using perl.
The structure consists of STRRRR...E
- S=html header just before table begins
- T=unique table start structure in the html file(I can identify it)
- R=Group of html elements(those are tr's, I can identify it too)
- E=All remaining - singnifies end R's
I want to extract all R's in array using single line "m" perlop.
I'm looking for something like this:
@all_Rs = $htmlfile=~m{ST(R)*E}gs;
But it has never worked out.
Until now I've been doing round about way to do it like using deleting unwanted text, for loop etc. I want to extract all rows from this page: http://www.trainenquiry.com/StaticContent/Railway_Amnities/Enquiry%20-%20North/STATIONS.aspx and there are many such pages.