import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class JI9029306 {

	public static void main(String[] args) {
		String search1 = "\\b\\Q$Eclipse\\E\\b"; 
		String search2 = "\\Q$Public\\E"; 
		String text = "available under the terms of the $Eclipse $Public License"; 

		int patternFlags = Pattern.CASE_INSENSITIVE; 
		Pattern pattern1 = Pattern.compile(search1, patternFlags); 
		Pattern pattern2 = Pattern.compile(search2, patternFlags); 
		Matcher m1 = pattern1.matcher(text); 
		Matcher m2 = pattern2.matcher(text); 
		// the difference in output shows the bug 
		System.out.println(String.format("m1.find():%s%nm2.find():%s", m1.find(), m2.find())); 
	}

}
