#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mx)# Adding password requirements are as easy as tacking on" & @CRLF & _
"# another (?=...) group." & @CRLF & _
"^" & @CRLF & _
"(?=(?:[^a-z]*[a-z]){1}) # At least {1} lowercase 'a-z' letter" & @CRLF & _
"(?=(?:[^A-Z]*[A-Z]){2}) # At least {2} uppercase 'A-Z' letters" & @CRLF & _
"(?=(?:[^0-9]*[0-9]){3}) # At least {3} digits" & @CRLF & _
"(?=(?:[^\s]*[\s]){1}) # At least {1} whitespace" & @CRLF & _
"(?=(?:[^[:punct:]]*[[:punct:]]){1}) # At least {1} special char" & @CRLF & _
"(?=.{9}) # A minimum of 9 characters" & @CRLF & _
""
Local $sString = "See 'unit tests' to see all matching/non-matching examples." & @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