public PactDslJsonArray stringMatcher(String regex, String value) {
        if (!value.matches(regex)) {
            throw new InvalidMatcherException(EXAMPLE + value + "\" does not match regular expression \"" +
                regex + "\"");
        }
        body.put(value);
        matchers.addRule(rootPath + appendArrayIndex(0), regexp(regex));
        return this;
    }
public PactDslJsonArray stringMatcher ( String regex , String value ) { if ( ! value . matches ( regex ) ) { throw new InvalidMatcherException ( EXAMPLE + value + "\" does not match regular expression \"" + regex + "\"" ) ; } body . put ( value ) ; matchers . addRule ( rootPath + appendArrayIndex ( 0 ) , regexp ( regex ) ) ; return this ; }
Element that must match the regular expression
@param regex regular expression
@param value example value to use for generated bodies