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 further 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.1.0.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for re_patterns-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 342c266616498efbd9bab801ff568afe5295f489e0e153a49a324ce0e82813ca |
|
MD5 | 6fc8198c9b723c3221e6ca2440510a63 |
|
BLAKE2b-256 | 9a0eaa8b8aed4a9b49aea7ecc42f46ad0837519ebda14d7526ac2afe08bd332c |