private static String unescape(String in, String escChars) {
  if (in == null) return null;
  if (in.length() == 0) return ""; //can't be any escapes in 1-char String, and we need to guarentee one pass through the loop
  escChars = escChars.concat("\\");
  StringBuffer out = new StringBuffer(in.length());
  char c=' ', next=in.charAt(0); //fix it so the last line will do the right thing if we don't enter the loop
  int end = in.length()-1;
  int i;
  for (i=0; i<end; i++) {
    c = in.charAt(i);
    if (c == '\\') {
      next = in.charAt(i+1);
      if (escChars.indexOf(next) < 0) out.append(c);
      else {out.append(next); i++;}
    }
    else {
      out.append(c);
    }
  }
  /*
  if (c == '\\') {
    if (escChars.indexOf(next) < 0) out.append(next);
  }
  else out.append(in.charAt(i));
  */
  if (i==end)
    out.append(in.charAt(i));
  return out.toString().trim();
}