\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
- [SLUG] Regex Question Jason Rennie
- Re: [SLUG] Regex Question John Ferlito
- Re: [SLUG] Regex Question Jason Rennie
- Re: [SLUG] Regex Question John Ferlito
- Re: [SLUG] Regex Question Jason Rennie
- RE: [SLUG] Regex Question Angus Lees
- RE: [SLUG] Regex Question David Zverina
- RE: [SLUG] Regex Question Jason Rennie
- [SLUG] Regex question Alexander Samad
- Re: [SLUG] Regex question Jamie Wilkinson
- Re: [SLUG] Regex question Alexander Samad
- Re: [SLUG] Regex question Jamie Wilkinson
- Re: [SLUG] Regex question Stuart Cooper
- Re: [SLUG] Regex question Alexander Samad
- Re: [SLUG] Regex question bedel
- Re: [SLUG] Regex question Malcolm V
