Jump to content

Recommended Posts

Posted

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="?

Posted (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 by KillingEye
Posted (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
EndIf

Now go read the HelpFile about StringRegExp and see what all I did there.

Edited by exodius
Posted (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 by exodius

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...