code: public static Replacer makeTable(String... pairs)
      {
          if(pairs == null || pairs.length < 2)
              return new Replacer(Pattern.compile("$"), new DummySubstitution(""));
          TableSubstitution tab = new TableSubstitution(pairs);
          StringBuilder sb = new StringBuilder(128);
          sb.append("(?>");
          for(String s : tab.dictionary.keySet())
          {
              sb.append("\\Q");
              sb.append(s);
              sb.append("\\E|");
          }
          if(sb.length() > 3) sb.setCharAt(sb.length() - 1, ')');
          else sb.append(')');
          return new Replacer(Pattern.compile(sb.toString()), tab);
      }
docs: Makes a Replacer that replaces a literal String at index i in pairs with the String at index i+1. Doesn't need
  escapes in the Strings it searches for (at index 0, 2, 4, etc.), but cannot search for the exact two characters
  in immediate succession, backslash then capital E, because it finds literal Strings using {@code \\Q...\\E}.
  Uses only default modes (not case-insensitive, and most other flags don't have any effect since this doesn't care
  about "\\w" or other backslash-escaped special categories), but you can get the Pattern from this afterwards and
  set its flags with its setFlags() method. The Strings this replaces with are at index 1, 3, 5, etc. and
  correspond to the search String immediately before it; they are also literal.
  @param pairs alternating search String, then replacement String, then search, replacement, etc.
  @return a Replacer that will act as a replacement table for the given Strings