Hello,
I'm having some trouble with my regular expressions...
I want to match a date using preg match, where the delimiter may be one of either " ", "/","-","." or "\"
I tried the above patten, with no joy. I think the problem lies with my escaping of forward and back slashes... any ideas?
I'm having some trouble with my regular expressions...
I want to match a date using preg match, where the delimiter may be one of either " ", "/","-","." or "\"
Code:
$dateMatch = '/^\s*([0-9]{1,2})[//// \\\.-]+([0-9]{1,2})[//// \\\.-]*([0-9]{0,4})/';
preg_match($dateMatch,$str,$match);