quickcheck-regex-0.0.1: QuickCheck instances for arbitrary regular expressions and regex-conforming strings

Safe HaskellNone

Test.QuickCheck.Regex

Description

This module exports a matching function that turns a regular expression into a generator for strings matching that regex. For example:

>>> import Test.QuickCheck.Regex (matching)
>>> import Test.QuickCheck (generate)
>>> generate (matching "[-a-z0-9._%]+@[-a-z0-9.]+\\.[a-z]{3,18}\\.(asia|eu|today)")
"9%az4rmek@rar1d8qvo04jkd1.agzy.asia"

Documentation