regex question

Dan Shoop shoop at iwiring.net
Thu Apr 5 14:13:22 PDT 2007


At 2:36 PM -0400 4/5/07, János wrote:
>On Apr 5, 2007, at 1:25 PM, Dan Shoop wrote:
>
>>At 11:31 AM -0400 4/5/07, János wrote:
>>>Hi,
>>>
>>>I need a pointer to a documentation that 
>>>describe well the extended regular expressions.
>>>
>>>I need to match some strings that must start 
>>>with any of 'S', 'A', 'C' or 'N', followed by 
>>>two digits followed by a '-' /dash/, followed 
>>>by one to six digits.
>>>
>>>So I created the following one:
>>>
>>>"^[ACNS][0-9]{2}-[0-9]+$"
>>>
>>>I am not so sure that it really fixes the dash 
>>>to the 4th position and it definitely would 
>>>allow more than 6 digits at the end.
>>>
>>>Any good advise ?
>>
>>What's wrong with the O'Reilly book?
>>
>>www.oreilly.com/catalog/regex2/
>>--
>
>It is not in books24x7 where I have "free" access :)  Otherwise nothin'.

Safari Books offers a free trial membership (and 
ADC members get a reduced membership). It is 
available there.

-- 

-dhan

------------------------------------------------------------------------
Dan Shoop                                                   AIM: iWiring
Systems & Networks Architect                      http://www.ustsvs.com/
shoop at iwiring.net                                http://www.iwiring.net/
1-714-363-1174

"The wise man doesn't give the right answers, he poses the right
questions." -- Claude Levi-Strauss

------------------------------------------------------------------------

iWiring provides systems and networks support for Mac OS X, unix, and
Open Source application technologies at affordable rates.


More information about the MacOSX-admin mailing list