To find occurences of a pattern in a text, there come three algorithms into my mind:
Boyer-Moore
Rabin-Karp
Knuth-Morris-Pratt
afair Boyer-Moore has the best average case performance. I'm sure you can find details on the algorithm wit the search engine of your choice. :-)