#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?=[^a-z]*[a-z])(?=[^A-Z]*[A-Z])(?=\D*\d)(?=[^!#%]*[!#%])[A-Za-z0-9!#%]{8,32}$"
Local $sString = "Must include at least 1 lower-case letter." & @CRLF & _
"Must include at least 1 upper-case letter." & @CRLF & _
"Must include at least 1 number." & @CRLF & _
"Must include at least 1 special character (only the following special characters are allowed: !#%)." & @CRLF & _
"Is only allowed to include A-Za-z0-9!#% (no other characters are allowed)." & @CRLF & _
"Must be from 8 to 32 characters long." & @CRLF & _
"Happyness1!"
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