I came up with the following
([\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})
I would also like to remove emails that start with a number or -. By remove I mean to select only the address and not to remove the entire match.
Is there a way to do that?
I came up with the following
([\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})
I would also like to remove emails that start with a number or -. By remove I mean to select only the address and not to remove the entire match.
Is there a way to do that?
^(?:\d+|-+)?([\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})$
This should do the trick. It'll capture emails but also filter out ones that start with a number or the -
character and pulls the email from it.