Hi,
I remember reading this in DNN GitHub (https://github.com/dnnsoftware/Dnn.Platform/issues/2867), not exactly your case but good to explore. Particularly, Sebastian's link for PasswordStrengthRegularExpression (https://docs.microsoft.com/en-us/dotnet/api/system.web.security.membership.passwordstrengthregularexpression?view=netframework-4.8).
A sample regular expression is below. Minimum 6 non-whitespace characters, at least one digit, an uppercase and lowercase character, and a non-alphanumeric character.
(?=^[^\s]{6,}$)((?=.*?\d)(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[^\w\d\s]))^.*
Olan