Skip to main content

Simple regex library

Project description

pyregex(p)

What is it

Pyregex(p) is a backtracking Regex Engine complete with all major regular-expressions' features.

It is composed of a Lexer, a Parser (a TDRD parser) and finally the Engine.

Features implemented includes:

Feature Syntax
match start ^...
match end ...$
escaping \
grouping (...)
named group (?<name>...)
non-capturing group (?:...)
alternative a|b
wildcard .
space \s
quantifiers ? * +
curly brace quantification {exact} {min,max} {,max} {min,}
range element [^a-zA-Z059]

Play with the engine:

from pyregexp.engine import RegexEngine

reng = RegexEngine()

reng.match('^my_(beautiful_)+regex', '^my_beautiful_beautiful_beautiful_regex')

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

pyregexp-0.3.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyregexp-0.3.1-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file pyregexp-0.3.1.tar.gz.

File metadata

  • Download URL: pyregexp-0.3.1.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyregexp-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2bc06d1d50798b8cd81b5ffc003422621e46a6b6eaa449149c989601d6e86f2d
MD5 649712c716d7d0899575d0a3496c53f3
BLAKE2b-256 54e448dd96b9235abe4592bf3f1e01dfaa527a4b8e5a7c4c1d4333adf2c13f46

See more details on using hashes here.

File details

Details for the file pyregexp-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pyregexp-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pyregexp-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af992a9de8bdfb7124dbc8aaea52cd6f776f0986cfd12e51b080ff81e75fb041
MD5 a731b4ad1716a99003ae3f029b37af3a
BLAKE2b-256 617b64e9d82a93b1a2eb4909f24637a68cb09f59444914e8d0422e4d26af4f18

See more details on using hashes here.

Supported by

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