Regex for date.
        Posted  
        
            by Harikrishna
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Harikrishna
        
        
        
        Published on 2010-05-08T09:39:54Z
        Indexed on 
            2010/05/08
            12:18 UTC
        
        
        Read the original article
        Hit count: 556
        
What should be the regex for matching date of any format like
 26FEB2009 
 30 Jul 2009
 27 Mar 2008
 29/05/2008
 27 Aug 2009
What should be the regular expression for that ?
Edit I have regex that matches with 26-Feb-2009 and 26 FEB 2009 with but not with 26FEB2009. So if any one know then please update it.
(?:^|[^\d\w:])(?'day'\d{1,2})(?:-?st\s+|-?th\s+|-?rd\s+|-?nd\s+|-|\s+)(?'month'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[uarychilestmbro]*(?:\s*,?\s*|-)(?:'?(?'year'\d{2})|(?'year'\d{4}))(?=$|[^\d\w])
© Stack Overflow or respective owner