Skip to content

Commit 623929e

Browse files
committed
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.
1 parent 156ca23 commit 623929e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

electrum/payment_identifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def maybe_extract_url_from_lud_17_uri(data: str) -> Optional[str]:
6262

6363

6464
RE_ALIAS = r'(.*?)\s*\<([0-9A-Za-z]{1,})\>'
65-
RE_EMAIL = r'\b[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\.)+[A-Z|a-z]{2,7}\b'
66-
RE_DOMAIN = r'\b([A-Za-z0-9-]+\.)+[A-Z|a-z]{2,7}\b'
65+
RE_EMAIL = r'\b[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2,7}\b'
66+
RE_DOMAIN = r'\b([A-Za-z0-9-]+\.)+[A-Za-z]{2,7}\b'
6767
RE_SCRIPT_FN = r'script\((.*)\)'
6868

6969

0 commit comments

Comments
 (0)