soycharliente Posted June 26, 2007 Share Posted June 26, 2007 Does this not check that the input contains only letters and is case insensitive? <?php $error_name = preg_match("[a-z]i", $name) ? FALSE : TRUE; ?> Quote Link to comment Share on other sites More sharing options...
Orio Posted June 26, 2007 Share Posted June 26, 2007 preg_match("/[a-z]/i", $name) Orio. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted June 26, 2007 Author Share Posted June 26, 2007 What are the /s for? Quote Link to comment Share on other sites More sharing options...
effigy Posted June 26, 2007 Share Posted June 26, 2007 They are delimiters which contain the expression. Be aware that you can use other characters as well. P.S. If by letter you truly mean letter--which can be in any language--you'll need to use the Unicode property \p{L}. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.