mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-26 16:01:33 +00:00
Fixed the regex to match any prefix for TEL fields
This commit is contained in:
@@ -72,7 +72,7 @@ def process_vcard(input_vcard, output_vcard):
|
|||||||
|
|
||||||
# Regex to capture any telephone line.
|
# Regex to capture any telephone line.
|
||||||
# It matches lines starting with "TEL:" or "TEL;TYPE=..." or with prefixes like "item1.TEL:".
|
# It matches lines starting with "TEL:" or "TEL;TYPE=..." or with prefixes like "item1.TEL:".
|
||||||
phone_pattern = re.compile(r'^(?P<prefix>(?:TEL(?:;TYPE=[^:]+)?|(?:.*\.)?TEL)):(?P<number>.*)$')
|
phone_pattern = re.compile(r'^(?P<prefix>.*TEL(?:;TYPE=[^:]+)?):(?P<number>.*)$')
|
||||||
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
stripped_line = line.rstrip("\n")
|
stripped_line = line.rstrip("\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user