Strikers
Community Helper
I have a problem with this line in an AAC I am using.
Since I am using the latest version of Xampp it gives me a deprecated error on every ereg function on php.
I want to convert the ereg part on this code to a preg_match, but I don't know how.
I need to convert that to preg_match
Since I am using the latest version of Xampp it gives me a deprecated error on every ereg function on php.
I want to convert the ereg part on this code to a preg_match, but I don't know how.
Code:
static public function ValidPassword($pass) {
return strlen($pass) > 5 && strlen($pass) <= 50 && ereg('^[a-zA-Z0-9~!@#%&;,:\\\^\$\.\|\?\*\+\(\)]*$',$pass);
}
I need to convert that to preg_match
Code:
ereg('^[a-zA-Z0-9~!@#%&;,:\\\^\$\.\|\?\*\+\(\)]*$',$pass);