AV1611 Posted March 11, 2006 Share Posted March 11, 2006 This doesn't seem to allow CAPITOL letters...[code]if(!ereg("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$",$email)[/code]How do I fix it?I did this, and it works... isn't there a better way to tell it to ignore Capitols?[code]if(!ereg("^[_a-zA-Z0-9-]+(.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(.[a-zA-Z0-9-]+)*(.[a-zA-Z]{2,3})$",$email)[/code] Quote Link to comment Share on other sites More sharing options...
sgb162 Posted March 12, 2006 Share Posted March 12, 2006 If you're trying to ignore all capital letters, [^A-Z] should do it just fine.. Quote Link to comment Share on other sites More sharing options...
keeB Posted March 12, 2006 Share Posted March 12, 2006 [!--quoteo(post=354052:date=Mar 12 2006, 01:21 AM:name=sgb162)--][div class=\'quotetop\']QUOTE(sgb162 @ Mar 12 2006, 01:21 AM) [snapback]354052[/snapback][/div][div class=\'quotemain\'][!--quotec--]If you're trying to ignore all capital letters, [^A-Z] should do it just fine..[/quote]no silly he's trying to allow 'a-z A-Z 1-9 . a-z A-Z 1-9 @ a-z A-Z 1-9 . a-z A-Z 1-9' and underscoresanyway, there is no other way that i know of bud.. but a great regex it was [= 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.