python regular expressions for humans
Project description
re_patterns
python regular expressions for humans
Description
This module helps you build complex regular expressions.
Usage
Example:
>>> from re_patterns import Rstr
>>> regex = Rstr("Isaac").not_followed_by("Newton").named("non_newtonians")
>>> regex
'(?P<non-newtonians>Isaac(?!Newton))'
>>> match = regex.search("Isaac Lobkowicz, Isaac Newton")
>>> match.span()
(0, 5)
>>> match.group("non_newtonians")
'Isaac'
For rufther uses please look at the methods of the Rstr
class in __init__.py
.
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
re_patterns-1.0.1.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for re_patterns-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4fa7bea449e2496a897452acf4d21265b3221c6ce224c6cc365b8cb645d471d |
|
MD5 | 1a471ae91cbd3c41a137dfd08d3c1ef0 |
|
BLAKE2b-256 | 0edda88fed81de7e6ed5046441d007cf1c890a2a1d29b896ad0c0ceab4d73f53 |