python cffi bindings for the oniguruma regex engine
Project description
onigurumacffi
python cffi bindings for the oniguruma regex engine
installation
pip install onigurumacffi
- wheels should be available on pypi in most cases
- to build from source,
libonig-dev
must be installed prior to installation
api
the api is currently very limited (basically just enough to support what I needed).
compile(pattern: str) -> _Pattern
make a compiled pattern
compile_regset(*patterns: str) -> _RegSet
make a compiled RegSet
_Pattern.match(s: str, start: int = 0) -> Optional[_Match]
match a string using the pattern. optionally set start
to adjust the offset
which is searched from
_Pattern.search(s: str, start: int = 0) -> Optional[_Match]
search a string using the pattern. optionally set start
to adjust the offset
which is searched from
_Pattern.number_of_captures() -> int
return the number of captures in the regex
_RegSet.search(s: str, start: int = 0) -> Tuple[int, Optional[_Match]]
search a string using the RegSet. optionally set start
to adjust the offset
which is searched from
the leftmost regex index and match is returned or (-1, None)
if there is no
match
_Match.group(n: int = 0) -> str
return the string of the matched group, defaults to 0 (the whole match)
_Match[n: int] -> str
a shorthand alias for _Match.group(...)
_Match.start(n: int = 0) -> int
return the character position of the start of the matched group, defaults to 0 (the whole match)
_Match.end(n: int = 0) -> int
return the character position of the end of the matched group, defaults to 0 (the whole match)
_Match.span(n: int = 0) -> int
return (start, end)
character position of the matched group, defaults to 0
(the whole match)
_Match.expand(s: str) -> str
expand numeric groups in s
via the groups in the match
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
Built Distributions
File details
Details for the file onigurumacffi-0.0.15.tar.gz
.
File metadata
- Download URL: onigurumacffi-0.0.15.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65458a594a826ee7b7fc32756a7e3c98e959728c52e30f750336b2e60574f77b |
|
MD5 | 2bbfba6ff5ce196de1306898831e8f02 |
|
BLAKE2b-256 | 9e9e52d21d8ccc32c95cd39dfe2c4d8b3e4f0ed87d3008e23a351d5f7997e6fb |
Provenance
File details
Details for the file onigurumacffi-0.0.15-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: onigurumacffi-0.0.15-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 182.7 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 611737434b2e9b7a33a3394a28b4c6725d7bb4bc1fe0c9c61e69dd9384dea6e4 |
|
MD5 | fc9d7fa8a78d1d23137dd9f57aa5b476 |
|
BLAKE2b-256 | 386e0a04666064665845cf3991c63362f418f433e60f6ce1357e654c54d5cd64 |
Provenance
File details
Details for the file onigurumacffi-0.0.15-cp38-cp38-win32.whl
.
File metadata
- Download URL: onigurumacffi-0.0.15-cp38-cp38-win32.whl
- Upload date:
- Size: 166.3 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6214f3678057114a2cca196a96091bd348622ea9a5c84d5b49a34e20801ab356 |
|
MD5 | b35e2134ef51b95d44e45b052b82e698 |
|
BLAKE2b-256 | 1141861576c564ab5b920c3f89f6e1e2c2d9f6d0769d5b8e3b83d0a3abfe3f61 |
Provenance
File details
Details for the file onigurumacffi-0.0.15-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: onigurumacffi-0.0.15-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 182.6 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93240283dde714639918d70fca6ec4c49c34d54a12cb8ea715c0142fb7860db0 |
|
MD5 | 51fd96d3da58f8d45695f0c54fdaebb1 |
|
BLAKE2b-256 | 4d5d67f8cdf6f9e0b346e8fdf9e1107b5c6b8ed9cfa633d2cd3676060db535d0 |
Provenance
File details
Details for the file onigurumacffi-0.0.15-cp37-cp37m-win32.whl
.
File metadata
- Download URL: onigurumacffi-0.0.15-cp37-cp37m-win32.whl
- Upload date:
- Size: 166.2 kB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88280555e62721ce1444b908b1e40a478c205de173fdc219ab1173aebfffe21e |
|
MD5 | 21101775db73711f790d12f03fcb9f3c |
|
BLAKE2b-256 | 92b46f4e33a33590abefc35cfe520198269cf527f00f1ae6e5d63be618769c94 |
Provenance
File details
Details for the file onigurumacffi-0.0.15-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: onigurumacffi-0.0.15-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 182.6 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc57151ad079a23fe7c68c859aa3d99cc158cdb996ab671b2e1993e41cf0a6f6 |
|
MD5 | c7129b018f7cd9082c8a49e0e8355ab0 |
|
BLAKE2b-256 | 588aa454db043e938c49f89827692af2103ae7b9c8762eb1bfc6c5d571471f01 |
Provenance
File details
Details for the file onigurumacffi-0.0.15-cp36-cp36m-win32.whl
.
File metadata
- Download URL: onigurumacffi-0.0.15-cp36-cp36m-win32.whl
- Upload date:
- Size: 166.2 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61b462927c1357a6f443d8342a7a36a6278769a6c2fec2a2d32a313c100a3a0 |
|
MD5 | fe277d98552f40b493c5c84148478b5b |
|
BLAKE2b-256 | cbe64b5849d04c0bb9460f3437d90d85a8f2e2aff5f9aa060e00d5731df8c294 |
Provenance
File details
Details for the file onigurumacffi-0.0.15-cp36-abi3-manylinux1_x86_64.whl
.
File metadata
- Download URL: onigurumacffi-0.0.15-cp36-abi3-manylinux1_x86_64.whl
- Upload date:
- Size: 527.9 kB
- Tags: CPython 3.6+
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 306a8eb3d0cbef3fc9afc161caef177095c75bfac053f088472f1b3fc5dcc723 |
|
MD5 | ebc5e1eb51044bbf1e481e87e34d57b1 |
|
BLAKE2b-256 | e6fd1dcd09b93d4cf7d687d5608cdb54e0ce1b026b30ff7448c1db7f33b99c06 |
Provenance
File details
Details for the file onigurumacffi-0.0.15-cp36-abi3-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: onigurumacffi-0.0.15-cp36-abi3-macosx_10_13_x86_64.whl
- Upload date:
- Size: 221.5 kB
- Tags: CPython 3.6+, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fdff71e20a6360d28debb8b98fdd437c54323062ff1e86a8c9974b09b18cbad |
|
MD5 | 976d76ab20b82619b495ce9c44a04a7d |
|
BLAKE2b-256 | 2f8c261c8d110901b00da5356ba944024351255f2da73bf4db02299efee573aa |