Skip to main content

Substitute emails and phone numbers with dummy in your text.

Project description

email/phone block

A simple python function to substitute emails and phone number with dummies.

Unittest included.


pip install email_phone_block


easy_install email_phone_block


>>> from email_phone_block import filter_email_phone, filter_email, filter_phone
>>> filter_email("So please send me an email at, thanks!")
'So please send me an email at, thanks!'
>>> filter_phone("So please call me at 333-333-3333, thanks!'")
'So please call me at xxx-xxx-xxxx, thanks!'
>>> filter_email_phone("So please call me at 333-333-3333 or email me at, thanks!'")
'So please call me at xxx-xxx-xxxx or email at, thanks!'

For legacy reason you can still use from email_phone_block import block

Format Recognized


Phone numbers

  • 333-333-3333
  • 3333333333
  • 333 333 3333
  • 333 333-3333
  • 333333-3333
  • 333-3333333

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for email_phone_block, version 0.5
Filename, size File type Python version Upload date Hashes
Filename, size email_phone_block-0.5.tar.gz (1.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page