Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Working with an array of arrays

$
0
0
I'm using StringRegExp, with Flag = 4:
Return an array of arrays containing global matches including the full match (Perl / PHP style).

example:
[ autoit ]      
#include <Array.au3> $string = "asdf qwer zxcv" & @CRLF & "1231 4564 7897" & @CRLF & "poui lkjh mnbv" $array = StringRegExp($string, "(?U)(\w{4,4})\s(\w{4,4})\s(\w{4,4})\s?", 4) ; only way I know how:  temp arrays For $i = 0 To UBound($array)-1  $tempArray = $array[$i]  For $j = 1 To UBound($tempArray)-1   ConsoleWrite("[i,j]:[" & $i & "," & $j & "] [value]:[" & $tempArray[$j] & "]" & @CRLF)  Next Next

Is there anyway to work with within the array without setting it to the $tempArray?  Conceptually, something like:

[ autoit ]      
For $i = 0 To UBound($array)-1  For $j = 0 To UBound($array[$i])-1   ConsoleWrite($array[$i].[$j])  Next Next

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>