Click here to Skip to main content
15,861,125 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can't multiply... Pin
Luc Pattyn16-Dec-09 11:21
sitebuilderLuc Pattyn16-Dec-09 11:21 
GeneralRe: Can't multiply... Pin
o m n i16-Dec-09 12:57
o m n i16-Dec-09 12:57 
GeneralRe: Can't multiply... Pin
Luc Pattyn16-Dec-09 13:15
sitebuilderLuc Pattyn16-Dec-09 13:15 
QuestionString Placeholder/Templating Question Pin
Member 158975816-Dec-09 9:32
Member 158975816-Dec-09 9:32 
AnswerRe: String Placeholder/Templating Question Pin
Ian Shlasko16-Dec-09 10:47
Ian Shlasko16-Dec-09 10:47 
AnswerRe: String Placeholder/Templating Question Pin
PIEBALDconsult17-Dec-09 8:11
mvePIEBALDconsult17-Dec-09 8:11 
Questionsimple PAssword Policy Pin
THE SK16-Dec-09 9:16
THE SK16-Dec-09 9:16 
AnswerRe: simple PAssword Policy Pin
Luc Pattyn16-Dec-09 9:40
sitebuilderLuc Pattyn16-Dec-09 9:40 
Hi,

I wouldn't know with Regex; this is what I would do:
public bool IsValidPassword(string s) {
    if (s==null || s.Length<6) return false;
    int nLetters=0;
    foreach(char c in s) if (Char.IsLetter(c)) nLetters++;
    return nLetters>=2;
}


And someone is bound to come up with some more modern approach, probably using LINQ.

BTW: I don't think your criteria are alright; I would also require at least 2 non-letters.

Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


GeneralRe: simple PAssword Policy Pin
THE SK16-Dec-09 9:55
THE SK16-Dec-09 9:55 
AnswerRe: simple PAssword Policy Pin
#realJSOP16-Dec-09 10:03
mve#realJSOP16-Dec-09 10:03 
GeneralRe: simple PAssword Policy Pin
Eddy Vluggen16-Dec-09 10:52
professionalEddy Vluggen16-Dec-09 10:52 
QuestionLooking to Learn Programming better Need help please. Pin
Extremeshannon16-Dec-09 8:05
Extremeshannon16-Dec-09 8:05 
AnswerRe: Looking to Learn Programming better Need help please. Pin
OriginalGriff16-Dec-09 8:22
mveOriginalGriff16-Dec-09 8:22 
AnswerRe: Looking to Learn Programming better Need help please. Pin
#realJSOP16-Dec-09 8:59
mve#realJSOP16-Dec-09 8:59 
GeneralRe: Looking to Learn Programming better Need help please. Pin
Pete O'Hanlon16-Dec-09 9:02
subeditorPete O'Hanlon16-Dec-09 9:02 
GeneralRe: Looking to Learn Programming better Need help please. Pin
Luc Pattyn16-Dec-09 9:43
sitebuilderLuc Pattyn16-Dec-09 9:43 
GeneralRe: Looking to Learn Programming better Need help please. Pin
PIEBALDconsult16-Dec-09 10:35
mvePIEBALDconsult16-Dec-09 10:35 
GeneralRe: Looking to Learn Programming better Need help please. Pin
Luc Pattyn16-Dec-09 11:02
sitebuilderLuc Pattyn16-Dec-09 11:02 
GeneralRe: Looking to Learn Programming better Need help please. Pin
PIEBALDconsult16-Dec-09 11:50
mvePIEBALDconsult16-Dec-09 11:50 
AnswerRe: Looking to Learn Programming better Need help please. Pin
BillWoodruff16-Dec-09 18:17
professionalBillWoodruff16-Dec-09 18:17 
QuestionContinued Values Collection/List/Dictionary [modified] Pin
Som Shekhar16-Dec-09 7:48
Som Shekhar16-Dec-09 7:48 
AnswerRe: Continued Values Collection/List/Dictionary Pin
#realJSOP16-Dec-09 9:04
mve#realJSOP16-Dec-09 9:04 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 19:16
Som Shekhar16-Dec-09 19:16 
AnswerRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen16-Dec-09 10:19
professionalEddy Vluggen16-Dec-09 10:19 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 19:15
Som Shekhar16-Dec-09 19:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.