How to check wether a Qstring is alpha numeric
-
Hi
I am using regexp in which I am alowing charactes A-Z,a-z,0-9 & special characters like '-' & '_'
But the problem is if the user sends the string as@
"----------" or "_________"
@so how to handle such things.
[EDIT: code formatting to trick out the formatting engine, Volker]
-
If you allow "-" and "_" as valid characters then I would regard
@
QString x = "-----------";QString y = "_________";
@as valid strings too.
-
Hi volker
how to check that string should contain atleast one char,one number & one special character.
-
Use QRegExp, check this "post":http://www.zorched.net/2009/05/08/password-strength-validation-with-regular-expressions/
I hope this help you :)