Skip to main content

Terry toolkit tkitRegex 正则合集 ,

Project description

tkit-regex-tools

tkit regex tools 正则合集

pip install tkitRegex

# or
pip install git+https://github.com/napoler/tkit-regex-tools
from tkitRegex import regex_plus
regexs=[
    {
        "regex_key":'follow_characters',
        "replace":''
    },
    {
        "regex_key":'email',
        "replace":'your_email_address'
    }
]
text="Here is our guide on how to 123@qq.com give 123@qq.com CBD oil to dogs. Follow us on Twitter @TriBeCa and @TriBeCaDog. Follow us on Facebook @TriBeCa and @TriBeCaDog."
print("replace:")
out=regex_plus(text,regexs=regexs,test=True,do="replace")
print(out)
print("match:")
for it in regex_plus(text,regexs=regexs,test=True,do="match"):
    print(it)

示例使用: https://github.com/napoler/tkit-regex-tools/blob/main/test.ipynb

推荐文档

https://github.com/manoss96/pregex https://github.com/napoler/pregex https://pregex.rtfd.io/

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

tkitRegex-0.0.0.116626169.tar.gz (22.3 kB view hashes)

Uploaded Source

Built Distribution

tkitRegex-0.0.0.116626169-py2.py3-none-any.whl (23.3 kB view hashes)

Uploaded Python 2 Python 3

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