0

My current code finds all cases where '+44' shows up in a website. I want this code to also produce all cases where '0131' occurs. Any help is appreciated, thank you. Code attached below.

phones = re.findall(r'\+44', page.decode())
phones.sort()
print (f'\n [+] {len(phones)} PHONE NUMBERS FOUND:\n')
for phone in phones:
print(phone)
Joe Bloggs
  • 41
  • 1
  • 6

1 Answers1

0

It will help you to find numbers of length 10:

import re
re.findall(r"\+44\s+?\d{10}|0131\s+?\d{10}", "This is number  +44 1234567890 and 0131 9090909090323")
P.Madhukar
  • 454
  • 3
  • 12