Registry / serialization / iregexp-check

iregexp-check

JSON →
library0.1.4pypypi✓ verified 82d ago

iregexp-check is a Python library providing bindings to a Rust crate for working with I-Regexp, an interoperable regular expression format. It allows Python developers to validate and interact with I-Regexp patterns. The library is actively maintained with regular updates and is currently at version 0.1.4.

pip install iregexp-check
INSTALL
IMPORT
SIG · IREGEXP-CHECK
I
iregexp-check
serializationpythonv0.1.4
Install
1.5s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.5s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

check
from iregexp_check import check
from iregexp_check import is_valid_iregexp
iregexp_check
from iregexp_check import iregexp_check
from iregexp_check import is_valid_iregexp

This quickstart demonstrates how to import and use the `is_valid_iregexp` function to check the validity of I-Regexp patterns. The function returns `True` for valid patterns and `False` for invalid ones.

from iregexp_check import is_valid_iregexp # Example 1: A valid I-Regexp pattern pattern_valid = "o.o|aa" print(f"'{pattern_valid}' is valid: {is_valid_iregexp(pattern_valid)}") # Example 2: An invalid I-Regexp pattern (e.g., unmatched parenthesis) pattern_invalid = "(abc" print(f"'{pattern_invalid}' is valid: {is_valid_iregexp(pattern_invalid)}") # Example 3: Another valid I-Regexp pattern pattern_simple = "foo" print(f"'{pattern_simple}' is valid: {is_valid_iregexp(pattern_simple)}")
Debug
Known issues
gotchaI-Regexp (Interoperable Regular Expression Format) has a specific syntax which may differ from common regular expression engines like PCRE (Perl Compatible Regular Expressions) or Python's `re` module. Patterns valid in other regex engines might be invalid or behave differently in I-Regexp.
fix
Always refer to the I-Regexp specification or relevant documentation to ensure your patterns adhere to its specific syntax, rather than assuming compatibility with PCRE/Python `re`.
affects: All versions
gotchaWhen defining regular expression patterns in Python, especially those with backslashes, always use raw strings (prefix the string literal with 'r', e.g., `r'\d+'`). This prevents Python's string literal processing from interpreting backslashes as escape sequences before the regular expression engine sees them, avoiding unexpected behavior or `SyntaxWarning`s.
fix
Change string literals for patterns from `"\s+"` to `r"\s+"`.
affects: All versions
Upgrade
Version history
0.1.4latest on PyPI · released Sep 24, 2024
Audit
Dependencies
pythonrequiredRequired Python interpreter version.
Agent activity
4 hits · last 30 days
node
4
Resources
iregexp-check — pip install iregexp-check · libregistry