I'm trying to convert the following ereg()
call to use preg_match()
instead:
if (ereg('(.*/)(.*)$',$fileref,$reg) ) {
This is the preg_match()
call I'm attempting to replace it with:
if (preg_match('(.*/)(.*)$',$fileref,$reg) ) {
When I run this code, I am presented with the following error:
preg_match(): Unknown modifier '('
What is the difference in syntax between ereg()
and preg_match()
that is causing this error?