2 ms·
Sane middle ground: $ txr This is the TXR Lisp interactive listener of TXR 147. Use the :quit command or type Ctrl-D on empty line to exit. 1> (regex-p
by kazinator 10y ago
Sane middle ground:
$ txr
This is the TXR Lisp interactive listener of TXR 147.
Use the :quit command or type Ctrl-D on empty line to exit.
1> (regex-parse ".*a(b|c)?")
(compound (0+ wild) #\a (? (or #\b #\c)))
2> (regex-compile *1)
#/.*a[bc]?/
- qwertyuiop924 10y agoI think SRE is a bit nicer than TXR's regex format, but it's the same idea.