Bug 212094 BirtComp.match doesn't work
The BirtComp.match() function is supposed to test if a value matches a JavaScript regular expression. However, the following expression always returns false when there are product codes that contain the string S24. BirtComp.match(dataSetRow["PRODUCTCODE"], /S24/)
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/script/ScriptEvalUtil.java
}
		
		try
		{
			Matcher m = Pattern.compile( patternStr, flags ).matcher( sourceStr);
			return m.lookingAt(); 
		}
		catch ( PatternSyntaxException e )
		{
			throw new DataException( ResourceConstants.MATCH_ERROR, e, patternStr );
		}
	}
	/**
	 * @return true if obj1 matches the given pattern, false otherwise
	 * @throws DataException
	 */
	private static boolean like( Object source, Object pattern ) throws DataException
	{
		String sourceStr = (source == null)? "": source.toString();
		String patternStr = ( pattern == null )? "" : pattern.toString();
	
		
		
		
		 
		
		
		
		final String reservedChars = "([{^$|)?*+.";
		int patternLen = patternStr.length();