Jump to content

Extracting a value from an array as a string

Go to solution Solved by Jewtus,

Recommended Posts

 I'm trying to take a table from IE and extract a specific value, convert it to a string, and then do a regex on it

I had this working for a bit 

Local $oNumTable = _IETableGetCollection($oIE, 0)
Local $aCount = _IETableWriteToArray($oNumTable)
local $a1= _ArrayExtract($aCount,1,1,0,0)
$s1= _ArrayToString($a1)
$count= StringRegExpReplace ($s1,"1 through 50 of ","")

but it doesn't seem to be working now. The value doesn't change locations so I can hardcode it, but I can't seem to figure this out. The _ArrayExtract doesn't seem to be a valid command anymore (which I don't fully understand since I had this working about a week ago and I didn't change anything)

I've adapted it to this:

Local $oNumTable = _IETableGetCollection($oIE, 0)
Local $aCount = _IETableWriteToArray($oNumTable)

$s1= _ArrayToString($aCount[1]) $count= StringRegExpReplace ($s1,"1 through 50 of ","")


$s1= _ArrayToString($aCount,"|",1,1,@CRLF,0,0)

But I can't seem to figure out the syntax for what I'm trying to do. I just want to grab a value (that I know where it is located) from an array. Any suggestions? (I feel like this is going to be a facepalm answer)

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