#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?im)^(?:(?:bank routing *)|(?:aba *)|(?:routing *))(?:(?:[\(\)\w #\.]*:)|(?:no: aba no\.)) ([0-9\- ]+)(?:\(for wires only\))*$"
Local $sString = "asd" & @CRLF & _
"ABA (ROUTING) NUMBER: 11111" & @CRLF & _
"eee" & @CRLF & _
"ABA NO.: 22222" & @CRLF & _
"sss" & @CRLF & _
"ABA Number: 33333" & @CRLF & _
"aaaa" & @CRLF & _
"ROUTING NUMBER: 44444" & @CRLF & _
"qqqq" & @CRLF & _
"ROUTING NUMBER: 55-5-55 (FOR WIRES ONLY)" & @CRLF & _
"lll" & @CRLF & _
"BANK ROUTING NO: ABA NO. 66-666" & @CRLF & _
"dddd" & @CRLF & _
"ABA ROUTING #: 77 77 7" & @CRLF & _
"aaaa" & @CRLF & _
"ROUTING NUMBER: 88888" & @CRLF & _
"zzzz" & @CRLF & _
"ABA (Routing Number): 99-99-9" & @CRLF & _
"mmm" & @CRLF & _
"ABA #: 1001001" & @CRLF & _
"qqq" & @CRLF & _
"ABA: 1101101" & @CRLF & _
"xxx" & @CRLF & _
"ABA Routing Number: 1201201" & @CRLF & _
"xxxx" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; 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