-1

I appreciate there is a lot of questions on Regular expressions to validate email address on SO. However, I simply don't understand how to use them to strip out or validate an email address. I have visited multiple sites where the author claims to 99% be able to validate an email address. However, whenever I use an Regular Expression to validate the following I get nothing back

Toranto43.623409,-79.368683 Toranto %6$^2 a.richey@mysite.com

I am completely new to Regular Expressions. So I'm sure I'm doing something wrong, but could someone find a Regular Expression that will find the address a.richey@mysite.com from the above?

Carltonp
  • 1,166
  • 5
  • 19
  • 39

1 Answers1

0

The following RegEx worked like a dream:

[a-zA-Z0-9.%+-]*@[a-zA-Z0-9.%+-]*.[a-zA-Z]{2,4}

Carltonp
  • 1,166
  • 5
  • 19
  • 39