                                        vert-id]]))
 
 (def edge-id-len (count edge-id))
+(def vertex-regex (re-pattern (str vert-id ".*")))
+(def edge-regex (re-pattern (str edge-id ".*")))
+
+
 
 (defn where-svg-was-clicked [event]
   (let [svg-rect (.getBoundingClientRect (dommy.core/sel1 :svg))

        add-or-delete (if (nil? connected-id) add-new-edge delete-edge)]
    (update-in world-state [:edges] add-or-delete)))

(defn toggle-vertex-size [selected world-state]
  (let [toggle-between-sizes #(inc (mod % 2))
        selected-vertex-size [:vertices selected 0]]

        connected? (comp connected-either-way? get-edge-ends)]
    (first (filter connected? edges))))



(defn make-new-edge [from to world-state]
  (let [next-to-largest-key (next-key (largest-key world-state))]
    [next-to-largest-key [from to :red]]))



(defn add-or-delete-edge [from to world-state]
  (let [connected-id (first (first-connected-edge from to world-state))
