I wondered if anyone has any idea how to best do this in php.
I have a string in a variable and I want to pull an email address from it (if one exists).
The string could be along the lines of :
"My email address is myemail@mydomain.com and I would appreciate it if you contact me"
I know I can validate if an email is valid or not but wondered how to search a string and extract the email.
IE: I can use filters to validate the email but I am stuck at how to search the string to see if it has an email.