title: substring match faster with regular expression?
body: <p>After having read up on RE/NFA and DFA, it seems that finding a substring within a string might actually be asymptotically faster using an RE rather than a brute force O(mn) find. My reasoning is that a DFA would actually maintain state and avoid processing each character in the "haystack" more than once. Hence, searches in long strings may actually be much faster if done with regular expressions.</p>
  
  <p>Of course, this is valid only for RE matchers that convert from NFA to DFA.</p>
  
  <p>Has anyone experienced better string match performance in real life when using RE rather than a brute force matcher?</p>