najeebuddinm98 / extract_phone_email

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extract phone numbers & email ids

This script accepts data either directly from the clipboard or from the user and extracts all the India-format phone numbers and email ids from the data. It then stores the extracted information in a text file (in the same folder as the scripts) along with a date and time stamp. This is done by using the regular expressions module.

Make sure you have the pyperclip module installed before running this script.

pip install pyperclip

You can read more about this module in its official documentation or the Automate the Boring Stuff with Python book.

Read more about using pip for different operating systems here.

Further modifications

If you want to change the code for your country, a change of expression only in the phoneRegex object is required. You can try out regular expressions for better understanding here.

About


Languages

Language:Python 100.0%