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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for tkitRegex-0.0.0.116626169.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 455206a85f7a0cbaa9ee8da59daa6bf7317982c76e42a05e9269696f9dd35a66 |
|
MD5 | 78f80000b0d6b9cc6e33c64003b7fd54 |
|
BLAKE2b-256 | 0efe858ea649cbd8c8b1d628c111725386b1ec64463e84e95d106d800de6b868 |
Close
Hashes for tkitRegex-0.0.0.116626169-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8493ee05b85e415e06b2821f1b9f20015649bd022e293af33c491d15e1fff298 |
|
MD5 | 3e6a47f8219fe434e96e38d144e9ec67 |
|
BLAKE2b-256 | 89c78137bf01449aa028913c0387f126c1548f559542cf28bb3a506765649625 |