I am trying to write .Net Regex for more than two letters from the side.
aa - fine Aa - fine aaa - not allowed Aaa - not allowed
I am new to regex, but so far this is what I put together.
if (Regex.IsMatch(Password, @"/[^A-Za-z]{2}/")) return "Password cannot contain 3 consecutive same letters";
I'm not sure if this is close or not.
dan_vitch
source share