\begin{John Ferlito}
> On Wed, Jan 10, 2001 at 02:16:03PM +1100, Jason Rennie wrote:
> > I need to parse a date of the form DD/MM/YYYY
> ^[0-3][0-9]\/[01][0-9]\/[0-9][0-9][0-9][0-9]$

i'd just do:

^[0-9]{2}/[0-9]{2}/[0-9]{4}$

and then read the digits as numbers (scanf("%u/%u/%u") or something)
and check that its actually a valid date, eg ranges, leap years,
etc. you're going to have to do this anyway, so there isn't much point
complicating the regex.

-- 
 - Gus


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to