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.

Install

pip install email_phone_block

or

easy_install email_phone_block

Usage

>>> from email_phone_block import filter_email_phone, filter_email, filter_phone
>>> filter_email("So please send me an email at name@domain.com, thanks!")
'So please send me an email at xxxx@xxxxx.xxx, 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 name@domain.com, thanks!'")
'So please call me at xxx-xxx-xxxx or email at xxxx@xxxxx.xxx, thanks!'

For legacy reason you can still use from email_phone_block import block

Format Recognized

Emails

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.

Source Distribution

email_phone_block-0.5.1.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file email_phone_block-0.5.1.tar.gz.

File metadata

File hashes

Hashes for email_phone_block-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a1b7b86735eae1c127577608017b2b5e00d446ccd39baccb214316b4e2658f7a
MD5 d224487426e720f98b087184c3c595a7
BLAKE2b-256 c82e4b0f84369d1c2101015ba466f91152110f006605e2a86a0c4bf11549c2b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page