Those are for matching a single pattern against a text. The intended usage of Rabin-Karp is to match a set of patterns against a text, in a more efficient manner than running Boyer-Moore or KMP on each individual pattern. An algorithm with a similar use-case to Rabin-Karp is the Aho-Corasick algorithm, which is very simple to learn if you know KMP already - the preprocess of the set of patterns is just a generalization of the preprocess of the pattern in KMP.
Comments
We shouldn't forget about Boyer-Moore or Knuth-Morris-Pratt either.
http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_sear...
http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pr...
Those are for matching a single pattern against a text. The intended usage of Rabin-Karp is to match a set of patterns against a text, in a more efficient manner than running Boyer-Moore or KMP on each individual pattern. An algorithm with a similar use-case to Rabin-Karp is the Aho-Corasick algorithm, which is very simple to learn if you know KMP already - the preprocess of the set of patterns is just a generalization of the preprocess of the pattern in KMP.