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] Link to comment https://forums.phpfreaks.com/topic/4720-ereg-not-working-as-expected/ 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.. Link to comment https://forums.phpfreaks.com/topic/4720-ereg-not-working-as-expected/#findComment-16543 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 [= Link to comment https://forums.phpfreaks.com/topic/4720-ereg-not-working-as-expected/#findComment-16589 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.