I’m guessing this function would require some kind of expression, but I really suck at expressions, and so am asking for a little help. I need a function that will search a given string for a date and return both the date in a specified format (YYYY-MM-DD) and the string with the date removed.
For example, here are some sample strings:
Dresden Dolls Space Gallery Portland Oregon 06-02-2005
Dead Weather House Of Blues Boston 18/07/2009
Dirty Fuzz Harmonie Bonn 23.03.2007
The dates are always in DD-MM-YYYY format, but sometimes the delimiter is a hyphen, period, or a slash.
After running each string through the function, I should have an array of two variables, one containing the date in YYYY-MM-DD format and the original string with the date removed. For example:
Dresden Dolls Space Gallery Portland Oregon ---- 2005-02-06
Dead Weather House Of Blues Boston ---- 2009-07-18
Dirty Fuzz Harmonie Bonn ---- 2007-03-23