#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mx)^ # 匹配行首" & @CRLF & _
"(?=.*[A-Z]) # 向前环视,匹配到大写字母" & @CRLF & _
"(?=.*[a-z]) # 向前环视,匹配到小写字母" & @CRLF & _
"(?=.*\d) # 向前环视,匹配到数字" & @CRLF & _
"(?=.*[_\W]) # 向前环视,匹配到特殊字符" & @CRLF & _
".{10,} # 若满足以上环视条件,且有10个以上字符,则进行匹配" & @CRLF & _
"$ # 匹配行尾"
Local $sString = "// Good Case" & @CRLF & _
"asdfsadfANVasdfasdfasdf..sadfs1" & @CRLF & _
"www.baidu.com.COM123" & @CRLF & _
"qwerTYUIOP1233333333333333" & @CRLF & _
"qwerTYUIOP1233333333333333-=+" & @CRLF & _
"asdfsafxxxSSS..123" & @CRLF & _
"abcABC123,./" & @CRLF & _
"" & @CRLF & _
"// Bad Case" & @CRLF & _
"xxxyyyzzz" & @CRLF & _
"XYZxyz123" & @CRLF & _
"aaabbbccc" & @CRLF & _
"12342353125123asedf"
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