-type type() ::
#{'__type__' => 'erlang.util.Regex',
pattern => binary(),
regex => any()}.
-spec '__new__'(binary()) -> type().
-spec quote(binary()) -> binary().
-spec replace(type(), binary(), binary()) -> binary().
-spec replace(type(), binary(), binary(), [term()]) -> binary().
-spec run(type(), binary(), [term()]) ->
{match, term()} | match | nomatch | {error, term()}.
-spec split(type(), binary(), [term()]) -> [binary()].