Errr.... who is Chris? and what would he say about that post?
--
Ross Donald
Rad Software
"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:uk**************@tk2msftngp13.phx.gbl...
| Chris hasn't seen this post yet? :-)
| "Ross Donald" <ro**@radsoftware.com.auNOSPAM> wrote in message
| news:#y**************@TK2MSFTNGP12.phx.gbl...
| > Hi,
| >
| > I'm not touching that one!
| >
| >
http://www.regexlib.com has many pre-written regular expressions. You
| should
| > be able to find something there.
| >
| > If not, a very simple starting point would be
| >
| > ^\d{4}-[01][0-9]-[0-3][0-9]$
| >
| > --
| > Ross Donald
| > Rad Software
| > Free Regular Expression Designer @
| >
http://www.radsoftware.com.au/web/Products/
| >
| >
| > "poi" <dd****@rucs.nul> wrote in message
| > news:uV*************@TK2MSFTNGP12.phx.gbl...
| > >
| > >
| > > I found this regex on the web and it takes dates as MM/DD/YYYY. I
need
| > > it to take dates as YYYY-MM-DD but can't see how, can anyone point me
in
| > > the right direction?
| > >
| > >
| > > System.Text.RegularExpressions.Match dateMatch;
| > > System.Text.RegularExpressions.Regex dateTest =
| > > new Regex(
| > >
@"^((((((0?[13578])|(1[0-2]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|
| > >
(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((
| > >
0?[1-9])|([1-2][0-9]))))[\-\/\s]?\d{2}(([02468][048])|([13579][26])))|((
| > >
(((0?[13578])|(1[0-2]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[
| > >
469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9
| >
])|(1[0-9])|(2[0-8]))))[\-\/\s]?\d{2}(([02468][1235679])|([13579][013457
| > >
89]))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([
| > > AM|PM|am|pm]{2,2})))?$" );
| > > dateMatch = dateTest.Match( this.txtDateofLoss.Text.Trim() );
| > > if ( dateMatch.Success == false )
| > > {}
| > >
| > >
| > > *** Sent via Developersdex
http://www.developersdex.com ***
| > > Don't just participate in USENET...get rewarded for it!
| >
| >
|
|