Jump to content

Recommended Posts

Posted

Hello everyone. What would be the best way to get elements from ordered/unordered html lists? For instance, how would you extract the text out of the example list shown near the top of: http://www.w3schools.com/html/html_lists.asp ??

Posted (edited)

stringregexp function

;Option 1, using offset
$nOffset = 1
While 1
    $array = StringRegExp('<test>a</test> <test>b</test> <test>c</Test>', '<(?i)test>(.*?)</(?i)test>', 1, $nOffset)
    
    If @error = 0 Then
        $nOffset = @extended
    Else
        ExitLoop
    EndIf
    for $i = 0 to UBound($array) - 1
        msgbox(0, "RegExp Test with Option 1 - " & $i, $array[$i])
    Next
WEnd

There are many more examples under the helpfile for this function.

You could first use inetget, then read the saved file using stringregexp.

Or, use _INetGetSource and deviate from writing any files by using only variables.

Edited by Glyph

tolle indicium

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...