Merge remote-tracking branch 'christina23/master'

* christina23/master:
  Added unit tests for regex fix
  Improved regex for SMTP parsing
This commit is contained in:
Tim Wojtulewicz 2020-11-17 15:01:04 -07:00
commit a56fbe408f
5 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,8 @@
3.3.0-dev.551 | 2020-11-17 15:01:04 -0700
* Added unit tests for regex fix (christina23)
* Improved regex for SMTP parsing (christina23)
3.3.0-dev.548 | 2020-11-17 13:32:57 -0800

View file

@ -1 +1 @@
3.3.0-dev.548
3.3.0-dev.551

View file

@ -59,7 +59,7 @@ 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)];

View file

@ -19,3 +19,9 @@ three@example.com,
one@example.com,
two@example.com
}
john.smith@email.com
[john.smith@email.com, jane.doe@email.com]
{
john.smith@email.com
jane.doe@email.com
}

View file

@ -15,3 +15,7 @@ s = "ieje one@example.com, eifj two@example.com, asdf three@example.com, one@exa
print extract_first_email_addr(s);
print extract_email_addrs_vec(s);
print extract_email_addrs_set(s);
s = "\"Smith, John\" <john.smith@email.com>, \"Doe, Jane\" <jane.doe@email.com>";
print extract_first_email_addr(s);
print extract_email_addrs_vec(s);
print extract_email_addrs_set(s);