RE: Regex peculiarity

2002-03-21 Thread David Gray
> 10,10,10,10 > nope.. \d+ matches the first digit \w+ matches the second > digit nothing for > \d* then , > > > try this: > /^(?:\d+[a-z]+\d*,?){4}$/ *ack* thanks :) \w matches alphaNUMERIC and _ Silly me. -dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

RE: Regex peculiarity

2002-03-21 Thread David Gray
> I'm not clear on what you're trying to match for. Is it: > Exactly one digit, followed by exactly any two characters, > followed by zero or more digits? One or more digits, followed by one or more characters, followed by zero or more digits, followed by zero or more commas, four times. (does

RE: Regex peculiarity

2002-03-21 Thread Nikola Janceski
10,10,10,10 nope.. \d+ matches the first digit \w+ matches the second digit nothing for \d* then , try this: /^(?:\d+[a-z]+\d*,?){4}$/ > -Original Message- > From: David Gray [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 21, 2002 3:58 PM > To: [EMAIL PROTECTED] >

RE: Regex peculiarity

2002-03-21 Thread Crook, Richard W
I'm not clear on what you're trying to match for. Is it: Exactly one digit, followed by exactly any two characters, followed by zero or more digits? -Original Message- From: David Gray [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 12:58 PM To: [EMAIL PROTECTED] Subj

Regex peculiarity

2002-03-21 Thread David Gray
I'm matching a list of 4 measurments (i.e. 4pc,4pc,4pc,4pc) that all have to have some sort of unit specification (i.e. 4pc6,4in,4px,4pt) and I'm running into a bit of an oddity... If I use the regular expression: /^(?:\d+\w+\d*,?){4}$/ to match the above sequence, it matches the string '10,10,