Jump to content

How get one word in html

Go to solution Solved by Malkey,

Recommended Posts

  • Solution

Here are another couple of methods base on the "id".

#include <String.au3>

$string = '<span id="lblTotal" class="Bold_Text">26</span>'
$found = StringRegExpReplace($string, '(?s).*id="lblTotal"[^>]*>([^<]+)</span>.*', "\1")
MsgBox(0, '', $found)


#include <IE.au3>

Local $Source = '<span id="lblTotal" class="Bold_Text">26</span>'

Local $oIE = _IECreate("about:blank", 0, 0, 0, 0)
_IEBodyWriteHTML($oIE, $Source)

Local $oId = _IEGetObjById($oIE, "lblTotal")

MsgBox(0, "Results", $oId.innertext)
Link to comment
Share on other sites

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...