larzregex
Explain regular expressions in plain English.
Regexes are powerful and cryptic. larzregex explains a pattern token by token in plain English (digits, classes, anchors, quantifiers, groups) and tests it against text, showing exactly what matched - a learning and debugging tool over a real from-scratch backtracking regex engine.
larzscript pkg install regex
What you get
- Plain-English explain()
- test() finds all matches + spans
- highlight() the matches
- Learn regex before you trust it
Try it
import "regex" as regex
print(regex.test("[0-9]+", "abc123"))
print(regex.find("[0-9]+", "abc123"))
print(regex.matched_text("[0-9]+", "abc123"))
print(regex.replace("[^a-z0-9]+", "Hello, World!".lower(), "-"))
print(regex.split("\\s+", "a b\tc"))Output
true [3, 6] 123 hello-world- [a, b, c]
Why it's in the Larz Stack
larzregex is a real Larzscript package (larzscript pkg install regex) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.