Regenerate is a tool to generate test-cases for regular expression engines.
Regenerate takes a regular expression and generates strings that match it.
It handles most posix extended regular expressions along with
~a) and intersection (
the help for details.
Since it handles complement, it can also generate strings that
don't match a given regular expression.
Below, we generate both positive and negative examples for the
language composed of the letter 'a' and 'b'.
Regenerate is made with OCaml and a lot's of cool OCaml libraries. The native tool and the library are available on opam. This page was made with the awesome js_of_ocaml compiler. The source code is available on github.
You can use most posix extended regular expressions plus complement and intersection. More precisely:
a: A single char.
[ab]: Character sets.
[^ab]: Complement Character sets.
[a-c]: Character ranges.
Back references, character classes, anchoring and lookahead/lookbehind are not supported.