I have a PHP function that finds tags in a variable, $string. I was wondering, how do I change this to find email addresses in $string? Note: Not all email addresses will be prescribed "mailto:" so it's probably a better approach to simply find all text before an "@" symbol that does not include any special characters (or a blank space). For example, from this ($string) the function should return as follows:
My name is John Doe and my email address is email@example.com.
function findinside($start, $end, $string)
preg_match_all('/' . preg_quote($start, '/') . '([^\.)]+)'. preg_quote($end, '/').'/i', $string, $m);