Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEA
I used two different RegEx expressions to pull out the dates:
(\d{1,2}[- ][a-zA-Z]{3,10}[- ]\d{2,4}) parses 16-APR-2005, 4-SEP-00
⦁ 1 to 2 digits \d{1,2}
⦁ either a dash ("-") or a space (" ") [- ]
⦁ 3 to 10 letters [a-zA-Z]{3,10} ---OR--- \D{3,10} ---OR--- [[:alpha:]]{3,10}
⦁ either a dash ("-") or a space (" ") [- ]
⦁ 2 to 4 digits \d{2,4}
([a-zA-Z]{3}\s\d{1,2}[,]{0,1}\s\d{2,4}) parses Nov 16, 1900, Jan 5 2000
⦁ 3 letters [a-zA-Z]{3,10} ---OR--- \D{3,10} ---OR--- [[:alpha:]]{3,10}
⦁ a space (" ") \s
⦁ 1 to 2 digits \d{1,2}
⦁ an optional comma [,]{0,1}
⦁ a space (") \s
⦁ 2 to 4 digits \d{2,4}
I then use a formula to convert the RegEx Results into a useable date field:
This is one of the shorter solutions. Note that the two RegEx functions could be combined into a single tool.
I truly think this could be done in one tool but RegEx hurts my brain