Re: match only a-z or 0-9

2002-11-13 Thread John W. Krahn
David Buddrige wrote: > > Alex Cheung Tin Ka wrote: > > > > Could anyone tell me how to make a regular expression for match a string only >[a-z0-9] ? > > [a-z0-9]+ will match a sequence of characters containing one or more of > the set [a-z0-9]. > > If you want to match a line of characters tha

RE: match only a-z or 0-9

2002-11-13 Thread Timothy Johnson
Correction: That should be [a-z0-9]+. (note the plus) -Original Message- From: Timothy Johnson To: 'Alex Cheung Tin Ka '; '[EMAIL PROTECTED] ' Sent: 11/13/02 12:01 AM Subject: RE: match only a-z or 0-9 You've essentially already done it. [a-z0-9] is a char

RE: match only a-z or 0-9

2002-11-13 Thread Timothy Johnson
in there.\n"; } -Original Message- From: Alex Cheung Tin Ka To: [EMAIL PROTECTED] Sent: 11/12/02 11:14 PM Subject: match only a-z or 0-9 Dear All, Could anyone tell me how to make a regular expression for match a string only [a-z0-9] ? Thanks -- To unsubscribe, e-mail: [EMAIL PR

Re: match only a-z or 0-9

2002-11-12 Thread David Buddrige
[a-z0-9]+ will match a sequence of characters containing one or more of the set [a-z0-9]. If you want to match a line of characters that contains NOTHING BUT [a-z0-9] then you could use: ^[a-z0-9]+$ If you want to match a sequence of characters that must start with [a-z] and contain any number

match only a-z or 0-9

2002-11-12 Thread Alex Cheung Tin Ka
Dear All, Could anyone tell me how to make a regular expression for match a string only [a-z0-9] ? Thanks