code: public static String reqExpEscape(String str) {
  	char[] arr = str.toCharArray();
  	StringBuilder sb = new StringBuilder(str.length() * 2);
  
  	for (int i = 0; i < arr.length; i++) {
  	    sb.append('\\');
  	    sb.append(arr[i]);
  	}
  
  	return sb.toString();
      }
docs: escape all special characters of the regular expresson language
  
  @param str String to escape
  @return escaped String