synchronized void compile(RegexEngine engine) throws RegexSyntaxException { if (regex == null) regex = engine.compile(pattern); }
public boolean lexicallyAllows(String str) { return regex.matches(str); }
private void addPatternParam(String value) throws DatatypeException { try { base = new PatternRestrictDatatype(base, library.getRegexEngine().compile(value), value); } catch (RegexSyntaxException e) { int pos = e.getPosition(); if (pos == RegexSyntaxException.UNKNOWN_POSITION) pos = DatatypeException.UNKNOWN; error("invalid_regex", e.getMessage(), pos); } }
private RegexSyntaxException makeException(String key) { return new RegexSyntaxException(localizer.message(key), pos - 1); }
private void addPatternParam(String value) throws DatatypeException { try { base = new PatternRestrictDatatype(base, library.getRegexEngine().compile(value), value); } catch (RegexSyntaxException e) { int pos = e.getPosition(); if (pos == RegexSyntaxException.UNKNOWN_POSITION) pos = DatatypeException.UNKNOWN; error("invalid_regex", e.getMessage(), pos); } }
private RegexSyntaxException makeException(String key, String arg) { return new RegexSyntaxException(localizer.message(key, arg), pos - 1); }
public boolean lexicallyAllows(String str) { return regex.matches(str); }
synchronized void compile(RegexEngine engine) throws RegexSyntaxException { if (regex == null) regex = engine.compile(pattern); }
private void addPatternParam(String value) throws DatatypeException { try { base = new PatternRestrictDatatype(base, library.getRegexEngine().compile(value), value); } catch (RegexSyntaxException e) { int pos = e.getPosition(); if (pos == RegexSyntaxException.UNKNOWN_POSITION) pos = DatatypeException.UNKNOWN; error("invalid_regex", e.getMessage(), pos); } }
private RegexSyntaxException makeException(String key, String arg) { return new RegexSyntaxException(localizer.message(key, arg), pos - 1); }
public boolean lexicallyAllows(String str) { return regex.matches(str); }
synchronized void compile(RegexEngine engine) throws RegexSyntaxException { if (regex == null) regex = engine.compile(pattern); }
private RegexSyntaxException makeException(String key) { return new RegexSyntaxException(localizer.message(key), pos - 1); }
boolean lexicallyAllows(String str) { return pattern.matches(str) && super.lexicallyAllows(str); }
private RegexSyntaxException makeException(String key, String arg) { return new RegexSyntaxException(localizer.message(key, arg), pos - 1); }
boolean lexicallyAllows(String str) { return pattern.matches(str) && super.lexicallyAllows(str); }
private RegexSyntaxException makeException(String key) { return new RegexSyntaxException(localizer.message(key), pos - 1); }
boolean lexicallyAllows(String str) { return pattern.matches(str) && super.lexicallyAllows(str); }
public Regex compile(String expr) throws RegexSyntaxException { try { final RegularExpression re = new RegularExpression(expr, "X"); return new Regex() { public boolean matches(String str) { return re.matches(str); } }; } catch (ParseException e) { throw new RegexSyntaxException(e.getMessage(), e.getLocation()); } } }
public Regex compile(String expr) throws RegexSyntaxException { try { final RegularExpression re = new RegularExpression(expr, "X"); return new Regex() { public boolean matches(String str) { return re.matches(str); } }; } catch (ParseException e) { throw new RegexSyntaxException(e.getMessage(), e.getLocation()); } } }