On Tue, Mar 4, 2008 at 2:19 PM, Adil Drissi <adil.drissi@xxxxxxxxx> wrote: > Hi, > > Is there any way to limit the user to a set of characters for example say i want my user to enter any character between a and z (case insensitive). And if the user enters just one letter not belonging to [a-z], this will not be accepted. <? if(preg_match('/^[a-z]+$/i',$argv[1])) { echo "Good.\n"; } else { echo "Bad.\n"; } ?> -- </Dan> Daniel P. Brown Senior Unix Geek <? while(1) { $me = $mind--; sleep(86400); } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php