code: static String escapeJSCurly(String re) {
  		re = re.replaceAll("(?<!\\\\)\\{(?!\\d)", "\\\\{");
  		re = re.replaceAll("(?<!(\\d,?|\\\\))\\}", "\\\\}");
  		return re;
  	}
docs: Escape curly braces that are not used in an expression like "{n}", "{n,}"
  or "{n,m}" (where n and m are positive integers).
  
  @param re
  the regular expression to escape
  @return the escaped expression