named groups (defined using ``(?P<name>...)``),
these will be preserved as named :class:`ParseResults`.

If instead of the Python stdlib ``re`` module you wish to use a different RE module
(such as the ``regex`` module), you can do so by building your ``Regex`` object with
a compiled RE that was compiled using ``regex``.

Example::

    realnum = Regex(r"[+-]?\d+\.\d*")
    # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression
    roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})")

    # named fields in a regex will be returned as named results
    date = Regex(r'(?P<year>\d{4})-(?P<month>\d\d?)-(?P<day>\d\d?)')

    # the Regex class will accept re's compiled using the regex module
    import regex
    parser = pp.Regex(regex.compile(r'[0-9]'))
F)