eregi.php : eregi « String « PHP






eregi.php

 
<?php
   $pswd = "asdf1asdf";
   if (!eregi("^[a-zA-Z0-9]{8,10}$", $pswd)) 
   echo "password must consist of alphanumeric characters, and must be 8-10 characters in length!";
?>
  
  








Related examples in the same category

1.Case-insensitive Pattern Matching
2.Getting the title of a remote page
3.eregi() function searches a string for another string.