regex question

János janos.lobb at yale.edu
Thu Apr 5 08:31:52 PDT 2007


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 ?

Thanks ahead,

János
I looked the man page and I looked at:
http://www.opengroup.org/onlinepubs/000095399/basedefs/ 
xbd_chap09.html#tag_09_04_09


More information about the MacOSX-admin mailing list