tool · regex / explain

regexlab.

explain regex patterns in plain english.

paste any regex. get a token-by-token breakdown — anchors, character classes, quantifiers, groups, lookarounds, flags. zero guessing. zero stack-overflow tabs.

npm i -g @v0idd0/regexlab
github → npm mit · free forever
regexlab icon
what it does

no more guessing what (?:[^\s]+) means.

four jobs. all token-by-token. all in your terminal. no api call, no internet round-trip, no “ai might hallucinate” surprise — just a plain parser that explains every glyph.

break down a pattern

$ regexlab '^\d{3}-\d{4}$'
^ → start of line
\d{3} → digit, exactly 3 times
- → literal "-"
\d{4} → digit, exactly 4 times
$ → end of line

annotate inline

$ regexlab --inline '\bfoo\b'
\b word boundary
foo literal "foo"
\b word boundary

diff two patterns

$ regexlab diff 'a+' 'a*'
a+ → one-or-more "a"
a* → zero-or-more "a"
diff: + accepts >=1, * accepts >=0

test against samples

$ regexlab test '^\d+$' 42 4.2 abc
42 → match
4.2 → no match
abc → no match
install

three ways. all painless.

npm

$ npm i -g @v0idd0/regexlab

node 14+ on linux / macos / windows. updates with npm update -g.

github releases

$ curl -L github.com/voidd0/regexlab/releases/latest

single static binary. zero runtime needed. all releases →

git clone

$ git clone github.com/voidd0/regexlab

read the source, send a pr, fork it. mit licence, no cla. repo →

why we built it

we kept pasting our own regexes back into regex101 just to remember what they did. so we wrote a parser that explains them in english — offline, in the terminal, in 0.04 seconds.

no telemetry. no signup. no “upgrade for the pro explanation.” mit forever, even if vøiddo dies tomorrow — the source is public and the npm package is yours to fork.

star on github → all tools