Bug 123726 "Top n", "Bottom n" in highlight dialog doesn't work.
Description: "Top n", "Bottom n" in highlight dialog doesn't work. Steps to reproduce: 1. Add a highlight for a table. 2. Set highlight rule: "account_id", "top n", "3", let its font color red. 3. Preview the report, it doesn't work. Attached is design file.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/script/ScriptEvalUtil.java
private static Matcher getJSReExprPatternMatcher( String patternStr )
	{
		if ( s_JSReExprPattern == null )
			s_JSReExprPattern = Pattern.compile("^/(.*)/([a-zA-Z]*)$");
		return s_JSReExprPattern.matcher( patternStr );
	}
	
	private static boolean match( Object source, Object pattern ) throws DataException
	{
		String sourceStr = (source == null)? "": source.toString();
		String patternStr = ( pattern == null )? "" : pattern.toString();
		
		
		 
		
		Matcher jsReExprMatcher = getJSReExprPatternMatcher( patternStr ); 
		int flags = 0;
		if ( jsReExprMatcher.matches() )
		{
			
			
			String flagStr = patternStr.substring( jsReExprMatcher.start(2), 
					jsReExprMatcher.end(2) );
			for ( int i = 0; i < flagStr.length(); i++)
			{
				switch ( flagStr.charAt(i) )
				{
					case 'm': flags |= Pattern.MULTILINE; break;
					case 'i': flags |= Pattern.CASE_INSENSITIVE; break;