RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find British ordinal date
Expression
(?:\s|^)(?P<day>(?P<threeone>31(?:st)?)|(?P<thirty>30(?:th)?)|(?P<twonine>29(?:th)?)|(?P<twoeight>2(?:1(?:st)?|2(?:nd)?|3(?:rd)?)|2[04-8](?:th)?|1[0-9](?:th)?|0?1(?:st)?|0?2(?:nd)?|0?3(?:rd)?|0?[4-9](?:th))?)(?:(?P<sep>[/\-\.:])|\s|\sof\s)(?P<month>(?(threeone)(?:jan|mar|may|jul|aug|oct|dec|january|march|july|august|october|december))(?(thirty)(?:jan|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|janurary|march|april|june|july|august|september|october|november|december))(?(twonine)(?:jan|(?P<feb>feb|february)|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|march|april|june|july|august|september|october|november|december))(?(twoeight)(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|june|july|august|september|october|november|december)))(?(sep)(?P=sep)|,?\s)(?P<year>(?:\d\d)?(?(twonine)(?(feb)(?:(?:[02468][048])|(?:[13579][26]))|(?:\d\d))|(?:\d\d)))(?:$|\s)
Description
Does full ordinal british dates
Matches
2nd february 2020, 30th of january, 2020
Non-Matches
30th february 2020
Author Rating: The rating for this expression. James Maguire
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials