On Tuesday 06 June 2006 12:52, Mark Martin wrote: > Hi, > would anybody have to hand a regex for date "dd-mmm-yy". I want to be able > to validate dates that should be along the lines of : > > 06-jan-06
m/(0?[1-9]|[12]\d|3[01])-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov| dec)-(\d\d)/i Untested... It does allow 31st of february and similar non existing dates though. I think this is easier to test afterwards using a module to get the maxdate in each month to compare with. Good luck! -- Bjørge Solli - Office:+47 55205847 http://www.nersc.no Nansen Environmental and Remote Sensing Center - Bergen, Norway Dept.: Mohn-Sverdrup Center for Global Ocean Studies and Operational Oceanography -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>