com.networknt.schema.regex.JDKRegularExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-schema-validator Show documentation
Show all versions of json-schema-validator Show documentation
A json schema validator that supports draft v4, v6, v7, v2019-09 and v2020-12
package com.networknt.schema.regex;
import java.util.regex.Pattern;
class JDKRegularExpression implements RegularExpression {
private final Pattern pattern;
JDKRegularExpression(String regex) {
this.pattern = Pattern.compile(regex);
}
@Override
public boolean matches(String value) {
return this.pattern.matcher(value).find();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy