Run a regex test against a dict value (whole string has to match).

        >>> Query().f1.matches(r'^\w+$')

        :param regex: The regular expression to use for matching

def matches(self, regex, flags=0):
        """
        Run a regex test against a dict value (whole string has to match).

        >>> Query().f1.matches(r'^\w+$')

        :param regex: The regular expression to use for matching
        """
        return self._generate_test(
            lambda value: re.match(regex, value, flags),
            ('matches', self._path, regex)
        )