Again, you can use the form below to test this regular expression: Restricting which characters can be used is not good practice as punctuation and other symbols provide extra security.
You might implement this code on your own website as follows: As you can see, it's well worth learning the intricacies of regular expressions.
Otherwise your application needs to provide this function.
Some text editors (not just vi) also allow them when searching for or replacing text. This is a new technique available in modern browsers and definitely the way of the future.Consider the following: If you are using a supported browser you can use the form below to test the regular expression: If you want to restrict the password to ONLY letters and numbers (no spaces or other characters) then only a slight change is required.Instead of using is shorthand for 'any letter, number or the underscore character'.Leaving the last requirement for now, as it requires a server-side script, let's see what's possible using just client-side HTML and Java Script.While having a strong password is a good first step, it needs to be backed up by additional measures on the server that prevent brute-force attacks.