This question already has an answer here:
How can I check to verify that a given string contains an email address.
The email address would be included with a lot of other text, as well.
Also, not looking to necessarily strictly validate the email address itself. More so just wanting to make sure that a@b.xyz
is present.
Example string:
Overall I liked the service, but had trouble using the widget generator.
Want more info? You can contact me at bob@example.org.
Plain javascript is fine, but I do happen to be using jQuery, so if there's some sort of helper function that makes this easier...go for it.
You can use this:
This also lets you get the email address from the array, if you need it.
Try
Debuggex Example
JsFiddle Example