Skip to content

Commit

Permalink
Revert unecessary regex change from e4393ae (#7599)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Sep 25, 2023
1 parent 4279fc5 commit 389c074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydantic/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def _build_pretty_email_regex() -> re.Pattern[str]:
name_chars = r'[\w!#$%&\'*+\-/=?^_`{|}~]'
unquoted_name_group = fr'((?:{name_chars}+\s+)*{name_chars}+)'
quoted_name_group = r'"((?:[^"]|\")+)"'
email_group = r'<\s*(.{0,254})\s*>'
email_group = r'<\s*(.+)\s*>'
return re.compile(rf'\s*(?:{unquoted_name_group}|{quoted_name_group})?\s*{email_group}\s*')


Expand Down

0 comments on commit 389c074

Please sign in to comment.