libfsm
libfsm copied to clipboard
Rewrite `(?:|xyz)` and `(?:xyz|)` to `(?:xyz)?`.
This helps a little for rendering out to more natural regexp syntax.
For example:
; ./build/bin/re -r pcre -bpl pcre '(?:a|)(?:|xyz)'
a?(?:xyz)?