davey10101 Posted February 24, 2010 Share Posted February 24, 2010 Hi, Im trying to install a plugin to my script that was built for an older version of php. It contains the following, which were giving me deprecated function errors ereg_match("name=([^&]+)",$params,$res); $params=ereg_replace("name=([^&]+)","name=".$name,$params); I updated the functions.. preg_match("name=([^&]+)",$params,$res); $params=preg_replace("name=([^&]+)","name=".$name,$params); but am getting the error:- Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash Can anyone help me, cheers. Quote Link to comment https://forums.phpfreaks.com/topic/193245-updating-ereg-functions/ Share on other sites More sharing options...
JAY6390 Posted February 24, 2010 Share Posted February 24, 2010 preg_match("/name=([^&]+)/",$params,$res); Is this a query string? ie ?a=somethign&b=somethingelse&name=something If so it might be worth you looking at parse_str() Quote Link to comment https://forums.phpfreaks.com/topic/193245-updating-ereg-functions/#findComment-1017527 Share on other sites More sharing options...
davey10101 Posted February 24, 2010 Author Share Posted February 24, 2010 Not sure about it being a query string, it's a plugin with thousands of line of code.... Works a treat though now, many thanks Quote Link to comment https://forums.phpfreaks.com/topic/193245-updating-ereg-functions/#findComment-1017605 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.