Need help with this preg_match expression please

Reply

Join Date: Feb 2005
Posts: 4
Reputation: MCAmy is an unknown quantity at this point 
Solved Threads: 0
MCAmy MCAmy is offline Offline
Newbie Poster

Need help with this preg_match expression please

 
0
  #1
Feb 26th, 2005
if(preg_match('`^[^@]*@{0,1}[^@]*$`',$string))

I had this written for me, but struggling to add in one other validation. I want to be able to also allow lowercase letters, but no special characters, numbers or uppercase letters. Can someone please help?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 348
Reputation: paradox814 is an unknown quantity at this point 
Solved Threads: 4
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

Re: Need help with this preg_match expression please

 
0
  #2
Feb 26th, 2005
i'm dont really know what this reg expr does so I take it that it already accepts upper case letters, in which case just make ALL the letters upper case when evaluating it.

if(preg_match('`^[^@]*@{0,1}[^@]*$`',strtoupper($string)))
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC