Reverts the regex change in dead3226a5.

The regex change broke some of the external tests. I added some more cases
to the regular email btest to hopefully cover all of the cases better.
This commit is contained in:
Tim Wojtulewicz 2020-11-18 15:32:45 -07:00
parent a56fbe408f
commit 01ec5ebdcd
3 changed files with 14 additions and 4 deletions

View file

@ -19,7 +19,7 @@ function extract_email_addrs_vec(str: string): string_vec
##
## str: A string potentially containing email addresses.
##
## Returns: A set of extracted email addresses. An empty set is returned
## Returns: A set of extracted email addresses. An empty set is returned
## if no email addresses are discovered.
function extract_email_addrs_set(str: string): set[string]
{
@ -58,8 +58,7 @@ function extract_first_email_addr(str: string): string
function split_mime_email_addresses(line: string): set[string]
{
local output = string_set();
local addrs = find_all(line, /(\"[^"]*\")?[^,]+@[^,]+/);
local addrs = find_all(line, /(\"[^"]*\")?[^,]+/);
for ( part in addrs )
{
add output[strip(part)];