Posted on: 5/26/2011 1:08:56 AM | Views : 649

I have been working on a regex to require special characters in passwords and limit the special characters that can be used. I have searched around and all other methods I have found are similiar to the one I am using. The Regex will require the use of two special characters from a group provided. However after that conditiion is met it will allow any character to be added that does not belong to this group.
(?=.*[!()@#$%^<>&*.+=_|`~-].*[!()@#$%^<>&*.+=_|`~-]) For now I have added the following seciton to prevent the use of some special characters. I could not find a better way to handle this.
(?!.*[/,:;'{}\[\]\x22\\]) Note: The complete Regex limits the number of total characters, numbers, letters
...

Go to the complete details ...