From a5f1a299e7a4c726cdaf84d100e0880a4d70494c Mon Sep 17 00:00:00 2001 From: f321x Date: Fri, 10 Apr 2026 09:27:19 +0200 Subject: [PATCH] pi: don't match literal | char in regexes The RE_EMAIL and RE_DOMAIN regexes matched the '|' character which is probably not what they should do. --- electrum/payment_identifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/payment_identifier.py b/electrum/payment_identifier.py index 4fac9ad92..198bb68a1 100644 --- a/electrum/payment_identifier.py +++ b/electrum/payment_identifier.py @@ -62,8 +62,8 @@ def maybe_extract_url_from_lud_17_uri(data: str) -> Optional[str]: RE_ALIAS = r'(.*?)\s*\<([0-9A-Za-z]{1,})\>' -RE_EMAIL = r'\b[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\.)+[A-Z|a-z]{2,7}\b' -RE_DOMAIN = r'\b([A-Za-z0-9-]+\.)+[A-Z|a-z]{2,7}\b' +RE_EMAIL = r'\b[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2,7}\b' +RE_DOMAIN = r'\b([A-Za-z0-9-]+\.)+[A-Za-z]{2,7}\b' RE_SCRIPT_FN = r'script\((.*)\)'