Initial Pattern Matching Algorithm
- read the text and the pattern
- position <- 1
- repeat until position is too large
- if pattern occurs at position in text then
- write position
- position <- position + 1
Here we have used a very high level pseudocode to outline our first pass at an algorithm.
Many details have purposefully been omitted.
The flexibility and power of expressing algorithms in pseudocode is emphasized.
in the string:
Last Updated 2001/09/13
© L.Heath, 2000, substantially updated by J.A.N. Lee, 2001.