C # determine whether to use English letters or numbers:
RegEx Reg = new RegEx (@ "^ [A-Za-z0-9] + $"); <br/> return Reg. ismatch (passwd );
Javascript checks the strength of the password string:
Int intscore = 0; <br/> If (passwd. match (/[A-Z]/) <br/>{< br/> intscore = (intscore + 1) <br/>} If (passwd. match (/[A-Z]/) <br/> {<br/> intscore = (intscore + 5) <br/>}< br/> If (passwd. match (// D +/) <br/>{< br/> intscore = (intscore + 5) <br/>} If (passwd. match (/d. */d. */d)/) <br/>{< br/> intscore = (intscore + 5) <br/>}< br/> If (passwd. match (/[!, @ # $ % ^ &*? _ ~] /) <Br/>{< br/> intscore = (intscore + 5) <br/>}if (passwd. Match (/([!, @ # $ % ^ &*? _ ~]. *[!, @ # $ % ^ &*? _ ~]) /) <Br/>{< br/> intscore = (intscore + 5) <br/>}< br/> If (passwd. match (/[A-Z]/) & passwd. match (/[A-Z]/) <br/> {<br/> intscore = (intscore + 2) <br/>}< br/> If (passwd. match (// D/) & passwd. match (// D/) // [verified] both letters and numbers <br/> {<br/> intscore = (intscore + 2) <br/>}< br/> If (passwd. match (/[A-Z]/) & passwd. match (/[A-Z]/) & passwd. match (// D/) & passwd. match (/[!, @ # $ % ^ &*? _ ~] /) <Br/>{< br/> intscore = (intscore + 2) <br/>}< br/> return intscore;