All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.networknt.schema.regex.JDKRegularExpression Maven / Gradle / Ivy

There is a newer version: 1.5.3
Show newest version
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