I have to extract the email from the following string:
$string = 'other_text_here to=<[email protected]> other_text_here <[email protected]> other_text_here';
The server send me logs and there i have this kind of format, how can i get the email into a variable without "to=<" and ">"?
Update: I've updated the question, seems like that email can be found many times in the string and the regular expresion won't work well with it.