Hey everyone, I’m trying to type a regular expression that follows the following format:
someone@somewhere.com or some.one@some.where.com
There are no special characters or numbers permitted for this criteria. I thought I had it down, but I’m a bit rusty with regular expressions and when I tested mine, it failed all across the boards. So far, my regular is expression is:
^[a-zA-Z]+/.?[a-zA-Z]*@[a-zA-Z]+/.?[a-zA-Z]*/.com$
If anyone could help me, it would greatly be appreciated, thanks.
your regex looks good. I think you need to change the / to \ in front of the . .
Additionally, if you don’t want someone.@somewhere..com pass your regex, u should change your regex to
(not completely sure about the brackets () though, but i think that should be working)