in reply to Re: Data normalisation
in thread Data normalisation

Actually, I need to amend the above a bit. Looking at your regexes again, I just realized that you'll have to put some capturing parens in them to keep everything happy, and stick undefs in the "if" clause accordingly.

E.g.,

$day = '([0-3]?[0-9])(?:th|st|nd|rd)'

And in the if, something like:

if ((($month, undef, $day, $year) = /($month)($day)($year)/io) ||

I didn't go through your regexes and if clauses and give you the exact solution, but I think you get the idea.

*Woof*