Mega Code Archive

 
Categories / Php / Strings
 

Eregi() function searches a string for another string

Its syntax is: int eregi(string pattern, string string, [array regs]) <? $password = "abc"; if (! eregi ("[[:alnum:]]{8,10}", $password)) :      print "Passwords must be from 8 through 10 characters in length."; endif; ?>