#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "TIMING ADVANCE.+(\d+)"
Local $sString = "Printout:" & @CRLF & _
"LOADING PROGRAM VERSION 24.103-0" & @CRLF & _
"PAGING IMSI ............................. 216990100000015" & @CRLF & _
"MANUAL PAGING ........................ SUCCESSFUL" & @CRLF & _
"IMSI ................................. 216990100000015 " & @CRLF & _
"TMSI ................................. 0063E557H/0006546775D" & @CRLF & _
"IMEI ................................. 355359049230050 WHITE LIST " & @CRLF & _
"IMEISV ............................... 57" & @CRLF & _
"MSISDN ............................... 36034031015 " & @CRLF & _
"CMSISDN .............................. N " & @CRLF & _
"SUBS STATUS .......................... IDLE" & @CRLF & _
"MOBILE COUNTRY CODE .................. 0216D" & @CRLF & _
"MOBILE NETWORK CODE .................. 0003D" & @CRLF & _
"LOCATION AREA CODE OF IMSI ........... 0D49H/03401D" & @CRLF & _
"CELL ID .............................. 84D1H/34001D" & @CRLF & _
"PAGING INTERFACE ..................... GSM" & @CRLF & _
"PAGING TIME .......................... 10 " & @CRLF & _
"TIMING ADVANCE ....................... 0" & @CRLF & _
"COMMAND EXECUTED"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm