#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?x)" & @CRLF & _
"^(?!.*[\s]) # this excludes whitespaces" & @CRLF & _
"(?=.*\d) # this matches at least one digit" & @CRLF & _
"(?=.*[a-z]{0,}) # this matches 0 or more lowercase letters" & @CRLF & _
"(?=.*[A-Z]) # this matches at least one uppercase character" & @CRLF & _
".{8,}$ # ensuring the minimum length is 8 symbols" & @CRLF & _
"# ^(?!.*[\s])(?=.*\d)(?=.*[a-z]{0,})(?=.*[A-Z]).{8,}$ the whole RegEx"
Local $sString = ""
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