-1

I'm using PHP Timeclock and I've had to mod several pages due to outdated code. However, I'm stuck on this one:

preg_match Unknown modifier ',' in timeclock/admin/timeedit.php on line 274

preg_match ("/^([0-9]{1,2})-,/,.-,/,.$/i", $post_date, $date_regs))

This page was unchanged from the source. Any Ideas?

sukebe7
  • 67
  • 6
  • just a note that this page was updated due to **eregi** being not supported. It's possible that 'eregi' simply got replaced with 'preg_match'. – sukebe7 Jan 08 '14 at 04:44

2 Answers2

1

Try changing your Perl delimiters from / to something else.

wizardjoe
  • 151
  • 5
0

got it with preg_match ("^([0-9]{1,2})[-,/,.]([0-9]{1,2})[-,/,.](([0-9]{2})|([0-9]{4}))$^"

Stephen Kennedy
  • 18,869
  • 22
  • 90
  • 106
sukebe7
  • 67
  • 6