Code: Select all
if (!ereg ("([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})", $startdate, $regs) || $startdate == '')I tried simply replacing ereg with preg_match, but that didn't work. I suspect I need to escape the / character (it gives "Unknown modifier: '/'"), but I couldn't figure out how.