The Problem: Given a text (string of characters)
T1, T2, T3, ..., Tn
and a pattern (string of characters)
P1P2P3 ... Pm,
find all occurrences of the pattern in the text.
EXAMPLE. With text
The cat and the rat sat on the mat.
the solution is that there are matches at these positions:
6, 18, 22, 33.
Last Updated 01/05/2000
© L.Heath, 2000