sunburn Posted January 24, 2008 Share Posted January 24, 2008 I've given this a good shot, but my research in the help file and forum is leaving me hanging. If someone could held with some ideas or direction, it would be greatly appreciated. Basically I want to capture some text that is found on a webpage to an array to be sorted later. Here is a small part of the source code that would be captured: Notice that there are up to 69 characters after the </A> on one line then only 50 on the other Trip Rv Type Date Departure Arrival Hours XXX XXX XXX XXX XXX St Commts <A HREF="/xvixps-xxxxxxxxxxxxx?11?24JAN08">S888</A> ASBY 24JAN 24JAN 1945 25JAN 0045 436 XXX <A HREF="/xvixps-xxxxxxxxxxxxxtr?276?MEM?11?25JAN08"> 276</A> 25JAN 25JAN 0850 26JAN 0542 600 XXX M10 Ideally element #1 would be populated with info found on the 2nd line that I posted 1)S888 (which is a obviously linked) 2)ASBY 3)24JAN 4)24JAN 1945 5)25JAN 0045 6)0436 7)XXX 8)Blank 9)blank 10)blank Ideally element #2 would be populated with info found on the 3nd line that I posted 1)276 (which is a obviously linked) 2)blank 3)25JAN 4)25JAN 0850 5)26JAN 0542 6)0600 7)XXX 8)Blank 9)m10 10)blank This might be simple for some of you, so please throw out some ideas on how to capture the desired info. Thanks Link to comment Share on other sites More sharing options...
Valuater Posted January 24, 2008 Share Posted January 24, 2008 Maybe... close #include <array.au3> Dim $List[3] $List_1 = '<A HREF="/xvixps-xxxxxxxxxxxxx?11?24JAN08">S888</A> ASBY 24JAN 24JAN 1945 25JAN 0045 436 XXX' $List_2 = '<A HREF="/xvixps-xxxxxxxxxxxxxtr?276?MEM?11?25JAN08"> 276</A> 25JAN 25JAN 0850 26JAN 0542 600 XXX M10' For $x = 1 To UBound($List) - 1 $temp_info = StringTrimLeft(Eval("List_" & $x), StringInStr(Eval("List_" & $x), ">")) $temp_info = StringReplace($temp_info, "</A>", "") $temp_info = StringSplit($temp_info, " ") _ArrayDisplay($temp_info) Next 8) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now