#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(.+):\s*TextConst\s*ENU\s*=\s*'(.*)',\s*ENG\s=\s'(.*)';"
Local $sString = "Regular Expression No.1 --> (.+):\s*TextConst\s*ENU\s*=\s*'(.*)',\s*ENG\s=\s'(.*)';" & @CRLF & _
"------------------------------------------------------------------------------------" & @CRLF & _
"" & @CRLF & _
"TxtLineText: TextConst ENU = 'Line %1: ', ENG = 'Line %1: ';" & @CRLF & _
"TxtNoLinesToProcess: TextConst ENU = 'There are no lines to process', ENG = 'There are no lines to process';" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Regular Expression No.2 --> (.+):\s*TextConst\s*ENU\s*='(.*)'\s*,\s*ENG='(.*)'\s*;" & @CRLF & _
"-----------------------------------------------------------------------------------" & @CRLF & _
"" & @CRLF & _
"TxtPurchaseWorksheetNosCode : TextConst ENU='PURCH WKSH',ENG='PURCH WKSH';" & @CRLF & _
"TxtPurchaseWorksheetNosDescription : TextConst ENU='Purchase Worksheet',ENG='Purchase Worksheet';" & @CRLF & _
"TxtPurchaseWorksheetNosStartingNo : TextConst ENU='PW000001',ENG='PW000001';" & @CRLF & _
"TxtSalesWorksheetNosCode : TextConst ENU='SALES WKSH',ENG='SALES WKSH';" & @CRLF & _
"TxtSalesWorksheetNosDescription : TextConst ENU='Sales Worksheet',ENG='Sales Worksheet';" & @CRLF & _
"TxtSalesWorksheetNosStartingNo : TextConst ENU='SW000001',ENG='SW000001';"
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