• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

I don't know how to convert ereg to preg_match

Strikers

Community Helper
Joined
Aug 16, 2009
Messages
48
Reaction score
3
Location
United States
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.

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);
 
Back
Top