#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^([ \f\t]*)((?!this)[^\/\n])*\.text\s*=[ \f\t]*([^$;\n=]+)"
Local $sString = "package {" & @CRLF & _
"" & @CRLF & _
"import flash.display.Sprite;" & @CRLF & _
"/*" & @CRLF & _
" ^([ \f\t]*)([^\/\n]*)\.text\s*=[ \f\t]*([^$;\n=]+)" & @CRLF & _
" $1UIUtils.updateLabel($2, $3)" & @CRLF & _
" */" & @CRLF & _
"public class Test_RegexpReplace2 extends Sprite {" & @CRLF & _
" public function Test_RegexpReplace2() {" & @CRLF & _
" //valid" & @CRLF & _
" ttt.text = Localisation(STR_CODE);" & @CRLF & _
" ttt.text= Localisation(STR_CODE);" & @CRLF & _
" ttt.text= Localisation(STR_CODE);" & @CRLF & _
" ttt.text = Localisation(STR_CODE)" & @CRLF & _
" ttt.text=Localisation(STR_CODE);" & @CRLF & _
" tt.hghgt.text=Localisation(STR_CODE);" & @CRLF & _
"" & @CRLF & _
" //invalid" & @CRLF & _
" preFilled.setVisible(field.text == "");" & @CRLF & _
" ttt.textLocalisation(STR_CODE);" & @CRLF & _
" ttt.text Localisation(STR_CODE);" & @CRLF & _
" ttttext=Localisation(STR_CODE)" & @CRLF & _
" tt.hghgt.text=;" & @CRLF & _
" tt.hghgt.text=" & @CRLF & _
" //_captionField.text = cover.caption;" & @CRLF & _
" /* _captionField.text = cover.caption;*/" & @CRLF & _
" this.text = text;" & @CRLF & _
" }" & @CRLF & _
"}" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"" & @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