I have such text:
<Neednt@email.com> If you do so, please include this problem report. <Anotherneednt@email.com> You can delete yourown
text from the attached returned message.The mail system <Some@Mail.net>: connect to *.net[82.*.86.*]: Connection timed out
I have to parse email from it. Could you help me with this job?
upd
There could be another email addresses in <%here%>. There should be connection between ‘The mail system’ text. I need in email which goes after that text.
Considering this text is stored in $text, what about this :
Which gives me :
Basically, I used a pretty simple regex, that matches :
<character>character :[^>][^>]+([^>]+)>characterSo, it captures anything that’s between
<and>.Edit after comments+edit of the OP :
If you only want the e-mail address that’s after The mail system, you could use this :
In addition to what I posted before, this expects :
The mail system\s*