KillingEye Posted March 14, 2009 Posted March 14, 2009 Hi, html code: <a href="dorf1.php?a=2&c=4dc"> A MessageBox should show me the "4dc".
exodius Posted March 14, 2009 Posted March 14, 2009 Well, the first question's going to be, what's your attempt so far look like? (Code please) The second question's going to be, is that string always formatted that way? As in the only variation is after "<a href="dorf1.php?a=2&c="?
KillingEye Posted March 14, 2009 Author Posted March 14, 2009 (edited) 1. I think i need something with stringsplit... EDIT: but how to read the string? 2. dorf1.php?a=$var1&c=$var2 <a href="dorf1.php?a=2&c=4dc"> Edited March 14, 2009 by KillingEye
exodius Posted March 14, 2009 Posted March 14, 2009 (edited) While StringSplit would be a way to go, it'd be more tedious than using a Regular Expression like this:#include <Array.au3> ; Only necessary to display the results quickly $String = '<a href="dorf1.php?a=2&c=4dc">' ; This would be whatever source HTML you're working off of If StringRegExp ($String, '(?:<a href="dorf1.php\?a=)([[:alnum:]]{1,4})(?:&c=)(4dc)(?:">)', 0) Then $RegExp = StringRegExp ($String, '(?:<a href="dorf1.php\?a=)([[:alnum:]]{1,4})(?:&c=)(4dc)(?:">)', 1) _ArrayDisplay ($RegExp) ; Only necessary to display the results quickly EndIfNow go read the HelpFile about StringRegExp and see what all I did there. Edited March 14, 2009 by exodius
KillingEye Posted March 14, 2009 Author Posted March 14, 2009 Ok thank you... But i dont know how to read the string out of the html code.
exodius Posted March 14, 2009 Posted March 14, 2009 (edited) How are you getting the HTML code? Using INetGet? or _IEDocReadHTML?*Edit - At this point do you even have code to get the HTML code? Edited March 14, 2009 by exodius
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