0

Good morning from Italy and sorry for my bad English :)

In to an old web application i need to make some change but i receive this warning :

ereg_replace is deprecated etc etc

I try to change :

eregi_replace("([0-9]*)(\/)([0-9]*)(\/)([0-9]*)","\\5-\\3-\\1",GetSQLValueString($_POST['dataordine'], "date")),

with :

preg_replace("([0-9]*)(\/)([0-9]*)(\/)([0-9]*)","\\5-\\3-\\1",GetSQLValueString($_POST['dataordine'], "date")),

but dont work ->

Warning: preg_replace(): Unknown modifier '(' in \www\testate_ins.php on line 23

What can i do ?

Thank you vary much for the help.

Bye.

Kumar V
  • 8,810
  • 9
  • 39
  • 58
geomo
  • 139
  • 1
  • 1
  • 15

1 Answers1

0

Just put '/' on the begining and the end of pattern like this

"/([0-9]*)(\/)([0-9]*)(\/)([0-9]*)/"

and it should work.

Nikola Nikolić
  • 356
  • 2
  • 17