#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?:city|route)=(\w+)(?:\(|\-)(\w+)(?:\,|\;)(\w+)"
Local $sString = "city=A(100,80);" & @CRLF & _
"city=B(160,70);" & @CRLF & _
"city=C(110,50);" & @CRLF & _
"city=D(140,120);" & @CRLF & _
"city=F(155,40);" & @CRLF & _
"city=G(210,60);" & @CRLF & _
"city=H(190,10);" & @CRLF & _
"city=I(170,110);" & @CRLF & _
"route=A-C;140;" & @CRLF & _
"route=A-D;155;" & @CRLF & _
"route=C-F;125;" & @CRLF & _
"route=D-B;115;" & @CRLF & _
"route=D-I;152;" & @CRLF & _
"route=B-F;119;" & @CRLF & _
"route=B-G;136;" & @CRLF & _
"route=G-F;133;" & @CRLF & _
"route=F-H;163;" & @CRLF & _
"route=I-H;197;"
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