I want to extract all emails that are received the email. I used this regex to extract just emails after To, it just extracts the first email.
To: ([a-z0-9_\.-]+@[\da-z\.-]+\.[a-z\.]{2,6})
And when I use this regex without To. It extracts the all emails wheather for reciver and sender.
([a-z0-9_\.-]+@[\da-z\.-]+\.[a-z\.]{2,6})
This is a sample of the data
Message-ID: <7618763.1075855377753.JavaMail.evans@thyme>
Date: Mon, 31 Dec 2001 10:53:43 -0800 (PST)
From: [email protected]
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Thank you