Skip to main content

Simple class for replace test with regex. Support scikit-learn transformer interface.

Project description

Regex Replacer

This is simple package for fast replace texts with regex. Support Rust regex syntax: https://docs.rs/regex/latest/regex/#syntax

Installation

pip install regex_replace --upgrade

Usage

from regex_replacer import RegexReplacerTransformer

transformer = RegexReplacerTransformer([
    (r'[0-9]+', " NUMBER "),
    (r"[a-z]+", " WORD ")
])
test_strings = [
    "this is a SIMPLE TEXT 12345 with number"
]
print(transformer.transform(test_strings))

# Output: [' WORD   WORD   WORD  SIMPLE TEXT  NUMBER   WORD   WORD ']

for multithread transform:

transformer = RegexReplacerTransformer([
        (r'[0-9]+', " NUMBER "),
        (r"[a-z]+", " WORD ")
    ], n_jobs=3)

to back to single thread:

transformer.to_single_thread()

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

regex_replacer-0.1.1-cp313-cp313t-manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13t manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp312-cp312-win_amd64.whl (553.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

regex_replacer-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp311-cp311-win_amd64.whl (554.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

regex_replacer-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp310-cp310-win_amd64.whl (530.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

regex_replacer-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp39-cp39-win_amd64.whl (530.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

regex_replacer-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

regex_replacer-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp38-cp38-win_amd64.whl (530.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

regex_replacer-0.1.1-cp38-cp38-manylinux_2_28_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

regex_replacer-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

regex_replacer-0.1.1-cp37-cp37m-win_amd64.whl (530.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

regex_replacer-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

Details for the file regex_replacer-0.1.1-cp313-cp313t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp313-cp313t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0be2e65bb4ffcf7d97f403c416b6f04ad2ffbe2fdd37d5d02d551d4760fa49af
MD5 ae268bb0b547c77951c4e4d75c00d613
BLAKE2b-256 87f4d18ba273494cceb859bd986e4a213e848f778b4e7e343229b9d561cbf717

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3ac660e2c096ce0206512ccaf4a4601e1cd23160c81454969bf699c0b3c98607
MD5 c25123fb92f0f3c0b958e24488e55850
BLAKE2b-256 6b8485cbc322c5f340d0af8975a78e8660292aea76a0f6e54c9430a36ba4af12

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0dec5b17a7938ff954cb42f321ab48434671d1e09f4fda41c63db73932018002
MD5 69a97ddbc8bcf83bc720efe0b716afeb
BLAKE2b-256 630c8f2792f2a9e53c4af7c36e117210dfe616130cb3d782172657e9478f9d1e

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7db9151ba51fb61b2637fd0a72bbcfb496d797c80dd6cf724ebf848f5e140e7c
MD5 a7aee87376927b0f8ec8d58c44b9af10
BLAKE2b-256 5f5d274718bd36ef61788bf720466416bab09bd8b5a0c6a1f019eeb78d42c73b

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2df53b877a0d21bcd537a9121866cc8f3e81385d1e039d7fd71f8aa2e1ecaa19
MD5 6102115ebe4c61001bd7e3031a32a6d6
BLAKE2b-256 0d6ecf87190322121ce952ad71cc4f05da09a79b85a9bc2357cbd26553ee466d

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0a1e1ebe6d3d91c3ed9d38272ec628abdc260ca8bce0af49b9e6b7569959d095
MD5 ffe6c22893be01c19d199e6362780a2d
BLAKE2b-256 e8bf76c3c14cddcaf83addf4671deb22cbc1e088cede56f30961fd07c6ef9cda

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a24ab75af329fe16188481b4ce4f0167e689eac3082cd29c9f42f8303d815453
MD5 0d677e9f85ba2cbaae8ac7eef0b2d697
BLAKE2b-256 47213c74bff36213fbd95fa3653132d8b795028ddd262844e46b1075d14efaf9

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 23c37c73783e9076078c838c8447bbb5721296abdedb994b53f878a8543cacc4
MD5 e3d29ff44590ffce63bd3dad8c25c2e2
BLAKE2b-256 a7e1480f693c53df0b414e61a5da6423a96bdeede7a4017dcd3bc5c3d3566480

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2e8e3ad5d69eb7cee9b416fcf110eae51e4eb3f093e55ca46853e661a6ef7335
MD5 10be6f27552ae4281e9a3574d6607048
BLAKE2b-256 953b68e3c880828faf4a0cc552114ac3e950b7e63197b0fd7b2141a298676593

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c787a3abe39463c54a919899325bb9736f3bd5be263f7ed4f347c658fa808f41
MD5 38220869b1f6d0555a47bb33c5124d00
BLAKE2b-256 f4b84552d60fd935416f04b2ae51f01aa8ce70b5256326fb00cbc192a777f2ab

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 665032890236611894f0140a2ba5a3503a82d6760bf9a516bbe2b4542bba84d5
MD5 3db71119b60a7ba05733883717d835f8
BLAKE2b-256 5f60a731070c9d61d65e3191fc8582f2308ad473f27a73d4e40b83211d7d6c31

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c066ff81cada05870298be1466d8ddd570467ea99eb2160aeabf080c22d5ee52
MD5 21c0b8f5f2a62e92a777ccd14bfa0b00
BLAKE2b-256 27c1b88308c9a03a747a4f06d3793e828c684063519e3aeadab89a94be3e79a6

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7f6fdd6157e01ca9eee1b88ee1084b0c4cbecb13b362d20be992893ee99b848b
MD5 1034e827a048b2b40f76b18e6d940f86
BLAKE2b-256 b473647e2114e91f4055db4a1589dbc1a1827fff110ed28ac4bd6a6a72a212d7

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6e8267f5632b7d00502a799f7556bc784488b1dc5e77f98b9978d963447efb1a
MD5 0e3a48bb8dd4c23987f909ccdbb4791a
BLAKE2b-256 f61e0dd7b2993c4150e8c1eb824b1f668c23fec24caae796425f723ca3a54ea6

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d5dfc56a5a33396f2778b26e12a7385feae8cd511b3f1fad4979c6e0edc63da
MD5 02555cb26ed2221c77153009101d2558
BLAKE2b-256 e8885dce26e36778b83dac68f0f9573e6efa7e5da9401fab081e80b42a80e866

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 17c94278273c496e2a749e34c212a925d00bf5ffc308b06c6f3169d8225bb606
MD5 60a64ff8739988abcd360841e6683f33
BLAKE2b-256 2eb4d0ab576e3604253103f12c179dfb59ce3dfb1c33e17713a1c3135d35bfe4

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2e975e20fc5334973c96af99700b3cc7dced16f1e16f879062276bd94eacfced
MD5 c3d1ecd728f754de9ef601c195cfbdb9
BLAKE2b-256 446646cff4cfacf09b105a18fbf62fb159957a912b59793c9cfa7d0a0ac39b19

See more details on using hashes here.

File details

Details for the file regex_replacer-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for regex_replacer-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7335491eefff80178e6a3191b1fe391ab2ba61c025ff8813be7b84ec5205fb4a
MD5 a83ba36a2dbf51064916c27896db0609
BLAKE2b-256 62535f2f2017571f42a27d08efb22a0ca90131f6ff563184dd6379e0b081933d

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