Click here to Skip to main content
16,007,858 members
Home / Discussions / C#
   

C#

 
GeneralTAPI Programming in C# Pin
SyedMazharAli29-Dec-04 9:27
SyedMazharAli29-Dec-04 9:27 
GeneralRe: TAPI Programming in C# Pin
Michael P Butler29-Dec-04 10:10
Michael P Butler29-Dec-04 10:10 
GeneralRe: TAPI Programming in C# Pin
Ray Cassick29-Dec-04 10:14
Ray Cassick29-Dec-04 10:14 
GeneralRe: TAPI Programming in C# Pin
Ray Cassick29-Dec-04 10:11
Ray Cassick29-Dec-04 10:11 
GeneralRe: TAPI Programming in C# Pin
SyedMazharAli29-Dec-04 10:38
SyedMazharAli29-Dec-04 10:38 
GeneralMany to many relationships Pin
wlowerycolumbus29-Dec-04 7:03
professionalwlowerycolumbus29-Dec-04 7:03 
GeneralRe: Many to many relationships Pin
Javier Lozano29-Dec-04 7:20
Javier Lozano29-Dec-04 7:20 
GeneralRegex Question Pin
Paul Lyons29-Dec-04 6:58
Paul Lyons29-Dec-04 6:58 
Let me first preface this question with a disclaimer. I've never used regular expressions before so I am admittedly clueless!

I'm trying to validate the entry of a TextBox using regular expressions. The entered value should only pass the validation if it contains contiguous alpha characters. The code below breaks if something like "ABC 1" is entered. Any occurance of a space in the string seems be ignored... Confused | :confused:

Regex re = new Regex(@"[a-z|A-Z]");
return re.IsMatch(TextBox1.Text.ToString(), 0);


What can I add to the pattern to test for the occurence of a " " within the string that will cause the validation to fail?

p.s. Is there a Regular Expressions for Dummies book? D'Oh! | :doh:

Paul Lyons, CCPL
Certified Code Project Lurker

GeneralRe: Regex Question Pin
Nick Parker29-Dec-04 7:09
protectorNick Parker29-Dec-04 7:09 
GeneralRe: Regex Question Pin
Charlie Williams29-Dec-04 7:46
Charlie Williams29-Dec-04 7:46 
GeneralRe: Regex Question Pin
Paul Lyons29-Dec-04 8:55
Paul Lyons29-Dec-04 8:55 
GeneralRe: Regex Question Pin
Heath Stewart29-Dec-04 9:01
protectorHeath Stewart29-Dec-04 9:01 
GeneralRe: Regex Question Pin
Charlie Williams29-Dec-04 9:50
Charlie Williams29-Dec-04 9:50 
Generalimage converting Pin
Member 161799929-Dec-04 4:59
Member 161799929-Dec-04 4:59 
GeneralRe: image converting Pin
Nick Parker29-Dec-04 6:39
protectorNick Parker29-Dec-04 6:39 
GeneralRe: image converting Pin
Member 161799929-Dec-04 6:44
Member 161799929-Dec-04 6:44 
GeneralRe: image converting Pin
Nick Parker29-Dec-04 7:12
protectorNick Parker29-Dec-04 7:12 
GeneralRe: image converting Pin
Heath Stewart29-Dec-04 8:59
protectorHeath Stewart29-Dec-04 8:59 
GeneralRe: image converting Pin
Charlie Williams29-Dec-04 7:58
Charlie Williams29-Dec-04 7:58 
Generala thread question Pin
cchere29-Dec-04 4:20
cchere29-Dec-04 4:20 
GeneralRe: a thread question Pin
Tom Larsen29-Dec-04 4:36
Tom Larsen29-Dec-04 4:36 
GeneralRe: a thread question Pin
cchere29-Dec-04 5:30
cchere29-Dec-04 5:30 
GeneralRe: a thread question Pin
Member 161799929-Dec-04 6:51
Member 161799929-Dec-04 6:51 
GeneralRe: a thread question Pin
cchere29-Dec-04 7:15
cchere29-Dec-04 7:15 
GeneralRe: a thread question Pin
Tom Larsen29-Dec-04 10:39
Tom Larsen29-Dec-04 10:39 

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.