#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\.(?i:engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml|sw[op]|bak|orig|save|lock)$|^composer\.json$|^#.*#$|~$"
Local $sString = ".engine" & @CRLF & _
".inc" & @CRLF & _
".install" & @CRLF & _
".make" & @CRLF & _
".module" & @CRLF & _
".module~" & @CRLF & _
".module.bak" & @CRLF & _
".module.orig" & @CRLF & _
".module.save" & @CRLF & _
".module.swo" & @CRLF & _
".module.swp" & @CRLF & _
".php~" & @CRLF & _
".php.bak" & @CRLF & _
".php.orig" & @CRLF & _
".php.save" & @CRLF & _
".php.swo" & @CRLF & _
".php.swp" & @CRLF & _
".profile" & @CRLF & _
".po" & @CRLF & _
".sh" & @CRLF & _
".sql" & @CRLF & _
".theme" & @CRLF & _
".twig" & @CRLF & _
".tpl.php" & @CRLF & _
".xtmpl" & @CRLF & _
".yml"
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