You can do this (in .NET) with several lookahead statements in one regex:
^(?=.*\p{Lu})(?:.*\p{Ll})(?=.*\d)(?=.*\W)(?!.*(.).*\1.*\1)
will match if all conditions are correct.
^ # Match the start of the string
(?=.*\p{Lu}) # True if there is at least one uppercase letter ahead
(?=.*\p{Ll}) # True if there is at least one lowercase letter ahead
(?=.*\d) # True if there is at least one digit ahead
(?=.*\W) # True if there is at least one non-alnum character ahead
(?!.*(.).*\1.*\1) # True if there is no character repeated twice ahead
Note that a match will not consume any string characters - if you want the match operation to return the string you are matching, add .*at the end of the regular expression.
In JavaScript, you cannot use Unicode character properties. So instead you can use
^(?=.*[A-Z])(?:.*[a-z])(?=.*\d)(?=.*\W)(?!.*(.).*\1.*\1)
, , ASCII . , . , [A-ZÄÖÜÀÈÌÒÙÁÉÍÓÚ] .. .., , , . , , , RegexOptions.ECMAScript, .NET regex JavaScript ( , !).