#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?x)^" & @CRLF & _
"(?> #MAIN iteration (atomic only for efficiency)" & @CRLF & _
" (?<upper>[A-Z]) # an uppercase letter" & @CRLF & _
" | # or" & @CRLF & _
" (?<lower>[a-z]) # a lowercase letter" & @CRLF & _
" | # or" & @CRLF & _
" (?<digit>[0-9]) # a digit" & @CRLF & _
" | # or" & @CRLF & _
" (?<special>[^(0-9|a-z|A-Z)]) # a special" & @CRLF & _
" | # or" & @CRLF & _
" . # anything else" & @CRLF & _
"){10,15}? #REPEATED 8+ times" & @CRLF & _
" #" & @CRLF & _
" #CONDITIONS:" & @CRLF & _
"(?(upper) # 1. There must be at least 1 uppercase" & @CRLF & _
" (?(lower) # 2. If (1), there must be 1 lowercase" & @CRLF & _
" (?(digit) # 3. If (2), there must be 1 digit" & @CRLF & _
" (?(special)" & @CRLF & _
"# must be 1 special " & @CRLF & _
" | (?!) # Else fail" & @CRLF & _
" ) #" & @CRLF & _
" | (?!) # Else fail" & @CRLF & _
" ) #" & @CRLF & _
" | (?!) # Else fail" & @CRLF & _
" ) #" & @CRLF & _
" | (?!) # Else fail" & @CRLF & _
") $ #"
Local $sString = "1ffdA$@3d3sd$f"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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