public static boolean matchRegex(Object left,Object right){
  if (left == null || right == null)   return false;
  Pattern pattern;
  if (right instanceof Pattern) {
    pattern=(Pattern)right;
  }
 else {
    pattern=Pattern.compile(toString(right));
  }
  String stringToCompare=toString(left);
  Matcher matcher=pattern.matcher(stringToCompare);
  RegexSupport.setLastMatcher(matcher);
  return matcher.matches();
}

public static boolean matchRegex ( Object left , Object right ) { if ( left == null || right == null ) return false ; Pattern pattern ; if ( right instanceof Pattern ) { pattern = ( Pattern ) right ; } else { pattern = Pattern . compile ( toString ( right ) ) ; } String stringToCompare = toString ( left ) ; Matcher matcher = pattern . matcher ( stringToCompare ) ; RegexSupport . setLastMatcher ( matcher ) ; return matcher . matches ( ) ; }
find the right hand regex within the left hand string and return a matcher .
