I have a document that a string that has a dynamic date but also contains other data I don’t need. A typical string looks something like this
\n\n \n \n Date: Jan. 25, 2012\n \n Location:\n \n \n Ukraine,\n \n
I wanted to grab the information between Date: and \n as the date shows up in the form above Month. Day, Year – but also as numeric values such as 1.25.2012
Is there a way to do this?
$match[1]will contain the date, which is any match afterDate:that is not a newline. How to parse it from there, you’ll have to decide.