Pattern p = Pattern.compile( pattern.toString( ) );
String patternString = pattern.toString( );  if ( patternString.indexOf( "%" ) >= 0 ) { patternString = patternString.replaceAll( "\\Q%\\E", ".*" ); }  Pattern p = Pattern.compile( patternString );
	private static boolean like( Object obj1, Object pattern ) throws DataException	{		if (obj1 == null || pattern == null) 		{		    if( obj1 == null && pattern == null)			    return true;			else			    return false;        }				boolean result = false;		try		{			Pattern p = Pattern.compile( pattern.toString( ) );			Matcher m = p.matcher( obj1.toString( ) );			result = m.matches( );		}		catch ( RuntimeException e )		{			throw new DataException( ResourceConstants.MATCH_ERROR, e );		}		return result;	}