syedabdullah32 commited on
Commit
5d19cc4
·
1 Parent(s): 111bce0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,7 +3,8 @@ import re
3
 
4
  def extract_entities(text):
5
  # Using regex to find Pakistani phone numbers
6
- phone_numbers = re.findall(r'\+\d{2}\d{3}\d{9}\b', text)
 
7
 
8
  # Using regex to find emails
9
  emails = re.findall(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b', text)
 
3
 
4
  def extract_entities(text):
5
  # Using regex to find Pakistani phone numbers
6
+ phone_numbers = re.findall(r'\+\d{2,3}\d{9,12}\b', text)
7
+
8
 
9
  # Using regex to find emails
10
  emails = re.findall(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b', text)