#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?im)match this (?:match that)"
Local $sString = "match this match that/// TRC20.sol -- API for the TRC20 token standard" & @CRLF & _
"" & @CRLF & _
"// See <https://github.com/tronprotocol/tips/blob/master/tip-20.md>." & @CRLF & _
"" & @CRLF & _
"// This file likely does not meet the threshold of originality" & @CRLF & _
"" & @CRLF & _
"// required for copyright to apply. As a result, this is free and" & @CRLF & _
"" & @CRLF & _
"// unencumbered software belonging to the public domain." & @CRLF & _
"" & @CRLF & _
"pragma solidity >=0.4.25;" & @CRLF & _
"" & @CRLF & _
"contract TRC20Events {" & @CRLF & _
"" & @CRLF & _
" event Approval(address indexed src, address indexed guy, uint wad);" & @CRLF & _
"" & @CRLF & _
" event Transfer(address indexed src, address indexed dst, uint wad);" & @CRLF & _
"" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"contract TRC20 is TRC20Events {" & @CRLF & _
"" & @CRLF & _
" function totalSupply() public view returns (uint);" & @CRLF & _
"" & @CRLF & _
" function balanceOf(address guy) public view returns (uint);" & @CRLF & _
"" & @CRLF & _
" function allowance(address src, address guy) public view returns (uint);" & @CRLF & _
"" & @CRLF & _
" function approve(address guy, uint wad) public returns (bool);" & @CRLF & _
"" & @CRLF & _
" function transfer(address dst, uint wad) public returns (bool);" & @CRLF & _
"" & @CRLF & _
" function transferFrom(" & @CRLF & _
"" & @CRLF & _
" address src, address dst, uint wad" & @CRLF & _
"" & @CRLF & _
" ) public returns (bool);" & @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