I’ve recently been trying to investigate the various ways to do substring searches and have stumbled upon the following article http://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_string_search_algorithm. I was wondering if there are any other common/efficient algorithms out there that anyone can suggest/show?
Thanks much
The most obvious would be Boyer-Moore or some variant such as Boyer-Moore-Horspool. For some situations, it’s also worth considering Knuth-Morris-Pratt.