#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(?!(.).*\1)(?:[A2345]{5}|[23456]{5}|[34567]{5}|[45678]{5}|[56789]{5}|[6789T]{5}|[789TJ]{5}|[89TJQ]{5}|[9TJQK]{5}|[TJQKA]{5})"
Local $sString = "A2345" & @CRLF & _
"23456" & @CRLF & _
"34567" & @CRLF & _
"45678" & @CRLF & _
"56789" & @CRLF & _
"6789T" & @CRLF & _
"789TJ" & @CRLF & _
"89TJQ" & @CRLF & _
"9TJQK" & @CRLF & _
"TJQKA" & @CRLF & _
"52634" & @CRLF & _
"JQ89T" & @CRLF & _
"JQ89J"
Local $sSubst = ""
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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