How would I formulte the pattern so I would extract the XXXX-XX-XX out of a time tag?
The line I'm searching for in a $string is this:
<time datetime="XXXX-XXX-XX" itemprop="birth">
And I want to extract the part:
XXXX-XX-XX
I have this but it's not working:
preg_match('\<time datetime="d{4}-d{2}-d{2}"',$string,$date);
echo $date[0] . "<br />";
I find regex expressions so damn confusing ... any good tutorial recommendation would also be great! Appreciate your time and help.
Cheers