title: Difference Between KMP and Regex/DFA-based Searching
body: <p>I am confused about the relation between <strong>KMP</strong> (Knuth–Morris–Pratt) and <strong>Regex</strong> (DFA-based) Searching.</p>
  
  <p>My thought is that KMP cannot use regex notations (e.g., <code>(A|B){2}C</code>), so it can only search for a "single" string (e.g., <code>AC</code> or <code>BC</code>, but not <code>AC|BC</code>). Is this true?</p>
  
  <p>Another question, if the pattern is a single string (<code>ABABAC</code>), are they essentially using the same?</p>