Forum Moderators: coopster
I have a string which contains all manner of junk, but an email address in the middle, something like:-
$txt='100 10 "u" "EM" "!^.*$!email:dean@example.com!"';
If it looks familiar it's a DNS NAPTR record. I need to extract the email part.
The email address will always start "!email:"
and will always end with a "!"
Is there a simple RegEx/preg I could use to extract that email addy (in this example case I'd be after "dean@example.com") to a new string?