At 03:59 AM 8/10/01 +0530, you wrote:
>Hi Peter,
>
> I have made the changes already. Thanks a lot but its hurtning. Just
> started with Regxes. I assure u, Here after u will get some thing
> apprciabely ok. Can u suggest better site for regexes
Get Jeff Friedl's book 'Mastering Regular Expressions" from
O'Reilly. Also, "perldoc perlretut" gives you a tutorial if you have Perl
5.6.1.
>Thanks,
>Anand
>
>
>>From: Peter Scott <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
>>Subject: Re: Date Validation Regex
>>Date: Thu, 09 Aug 2001 15:22:21 -0700
>>
>>At 03:16 PM 8/9/01 -0700, I wrote:
>>>At 05:43 PM 8/9/01 -0500, [EMAIL PROTECTED] wrote:
>>>>Hi ,
>>>>
>>>> Can anybody help me to write regex for date validation. The
>>>>validation criterion will be as below,
>>>>
>>>>with date in format dd/mm/yyyy &
>>>>
>>>>dd - should be less than 31
>>>
>>>Really? You're starting from 0?
>>>
>>>>mm - should be less than 12
>>>
>>>Ditto.
>>>
>>>>yyyy - no validation
>>>
>>>Not everything should be done with a single regex, even though anything
>>>can be. Here:
>>>
>>> $date =~ m#^(\d\d)/(\d\d)/(\d{4})$/ && $1 < 31 && $2 < 12
>>
>>Rats, hit Send too soon. The delimiter is #, not /:
>>
>> $date =~ m#^(\d\d)/(\d\d)/(\d{4})$# && $1 < 31 && $2 < 12;
>> # Now use date in ($1, $2, $3)
>>--
>>Peter Scott
>>Pacific Systems Design Technologies
>>http://www.perldebugged.com
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]