 = null;
        for (var left in bad) break;
        if (left == null) break;
        var right = bad[left];
        delete bad[left];
        for (var other in bad) if (bad[other] == right) {
          left += other;
          delete bad[other];
        }
        newRE += (newRE ? "|" : "") + toREElt(left) + toREElt(right);
      }

      document.getElementById("output").appendChild(document.createTextNode("Your regexp is: " + (newRE || "^$")));
    </script>
  </article>
