...

View Full Version : ereg Deprecated on php 5.3.6 looking for ereg replacement



CBG
08-29-2011, 10:03 AM
Hi,

I am running on a host that has PHP 5.3.6 and am getting a deprecated for ereg.

Here is the line of code I am getting the error on:

elseif ( !ereg("^([_[:alnum:]\,\'\ \.\-])+$", $string)) {

Should I change it to preg_match ?

Or should it be something else, if so what should I check ereg to?

Dormilich
08-29-2011, 11:08 AM
Should I change it to preg_match ?
yes. the preg_* functions have replaced the ereg functions



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum