python cffi bindings for the oniguruma regex engine
Project description
onigurumacffi
python cffi bindings for the oniguruma regex engine
installation
currently this requires libonig-dev
to be installed prior to installation
pip install onigurumacffi
api
the api is currently very limited (basically just enough to support what I needed).
compile(pattern: str) -> _Pattern
make a compiled pattern
_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
_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.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 Distribution
File details
Details for the file onigurumacffi-0.0.2.tar.gz
.
File metadata
- Download URL: onigurumacffi-0.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f8162b8052dcef2f10155895c5d4f834fa77a7403a6ca8637c7b513c202d1dc |
|
MD5 | 74054fc7f73776920f24badd88907d42 |
|
BLAKE2b-256 | 7ed515b4f072e106c4dbe782be2924019b64279eee68244f6c7f57c29f284cfb |
Provenance
File details
Details for the file onigurumacffi-0.0.2-cp36-abi3-manylinux1_x86_64.whl
.
File metadata
- Download URL: onigurumacffi-0.0.2-cp36-abi3-manylinux1_x86_64.whl
- Upload date:
- Size: 520.7 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.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | faffd78ebc6edbd7ae3d3e12a0c57a9702868d4c3bbc40dbd5bfbe069221d411 |
|
MD5 | 56dd6abce129632e08dbcc537b83b99c |
|
BLAKE2b-256 | e1552b1a966a3fdacc17ed1abdb3f4591bb9493b021f27790a6d568262a9ab3f |