I want to know if by using regular expressions I am able to extract emails from the following strings?
The following RE pattern is .*@.*
match with all st
You can use the following regex to capture all the email addresses.
(?[\w.]+)\@(?\w+\.\w+)(\.\w+)?
see demo / explanation
additionally if you want, you can capture only those emails that contains a specific domain name (ie. some-url.com) and to achieve that you just need to replace the \w+\.\w+
part after
with your desired domain name. so, it would be like (?
see demo / explanation