Reputation: 323
I have the email header below :
To: <email@domain.com>
Subject: =?utf-8?B?dGnDqnUgxJHhu4Ega2jDtG5nIHRp4bq/bmcgdmnhu4d0IGhvw6BuIHRv?=
=?utf-8?B?w6Bu?=
Date: Sat, 7 Jun 2014 21:39:10 +0700
I using this regex query to match the subject header :
Subject: ([^\r\n]*\r\n [^\r\n]*)
However some case the subject have more and more extra line:
Subject: =?utf-8?B?dGnDqnUgxJHhu4Ega2jDtG5nIHRp4bq/bmcgdmnhu4d0IGhvw6BuIHRv?=
=?utf-8?B?w6Bu4Ega2jDtG5nIHRp4bq/bmcgdmnhu4d0IGhvw6BuIHRv?=
=?utf-8?B?w6Bu4Ega2jDtG5nIHRp4bq/bmcgdmnhu4d0IGhvw6BuIHRv?=
Or just one line:
Subject: =?utf-8?B?dGnDqnUgxJHhu4Ega2jDtG5nIHRp4bq/bmcgdmnhu4d0IGhvw6BuIHRv?=
How can i edit the query to match all case ?
Upvotes: 0
Views: 503
Reputation: 20024
If Subject is always followed by Date you could try this as well:
/Subject: .*(?=Date)/s
/s
will make it work with one or multiple lines.Upvotes: 0