eregi() function searches a string for another string. : eregi « String « PHP






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;
?>
  
  








Related examples in the same category

1.Case-insensitive Pattern Matching
2.Getting the title of a remote page
3.eregi.php