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?

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)))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.