code: public static boolean isValidStringMatchingRegex(final String value, final String expression) {
  
  		Pattern pattern = patterns.get(expression);
  
  		if (pattern == null) {
  
  			pattern = Pattern.compile(expression);
  			patterns.put(expression, pattern);
  		}
  
  		return (value != null && pattern.matcher(value).matches());
  	}
docs: Checks whether the value of the given property key of the given node
  if not null and matches the given regular expression.
  
  @param node
  @param key
  @param expression
  @param errorBuffer
  @return true if string matches expression