Re: DateTime multiple language validation support (C#)
From: bredal Jensen (bred.jen_at_jensen.dk)
Date: 03/02/04
- Next message: bredal Jensen: "Re: DateTime multiple language validation support (C#)"
- Previous message: Kevin Spencer: "Re: Onmouseover"
- In reply to: bredal Jensen: "Re: DateTime multiple language validation support (C#)"
- Next in thread: bredal Jensen: "Re: DateTime multiple language validation support (C#)"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Mar 2004 14:27:47 +0100
The regular expression shown on the site are amazingly powerfull. I'm not
used to perl and awk and stuff and i think bringing this concept to the
windows world is a very
good move.
Is there a good way of patching the following sequence of caracters in a
string without too much trouble?
^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])
(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:
(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3
579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(
?:(?:1[6-9]|[2-9]\d)?\d{2}))($|
(?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(
[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$
"bredal Jensen" <bred.jen@jensen.dk> wrote in message
news:esUq0NEAEHA.2512@TK2MSFTNGP11.phx.gbl...
> Great help , thank you so much...
> "Simon Gorski >" <<s_gorski@sms.at> wrote in message
> news:u8o6jFEAEHA.808@TK2MSFTNGP12.phx.gbl...
> > Hello Bredal,
> > "bredal Jensen" <bred.jen@jensen.dk> schrieb im Newsbeitrag
> > news:OS4d%23CEAEHA.2348@TK2MSFTNGP09.phx.gbl...
> > > I need to validate a DateTime field regardless of the
> > > language my application is runnining in.
> > > I have a textbox field where users can enter the
> > > date like this:
> > >
> > > 02-03-2004 10:58:40 ----> meaning
> > > (March the 3rd 2004 10:58:40 AM).
> > >
> > >
> > > Any help will be great.
> > >
> > Work with regular expressions...look at this site..you will find the
right
> > syntax..
> >
> > http://www.regexlib.com/Search.aspx
> >
> > mfg simon g.
> >
> >
>
>
- Next message: bredal Jensen: "Re: DateTime multiple language validation support (C#)"
- Previous message: Kevin Spencer: "Re: Onmouseover"
- In reply to: bredal Jensen: "Re: DateTime multiple language validation support (C#)"
- Next in thread: bredal Jensen: "Re: DateTime multiple language validation support (C#)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|