Search a string for all occurrences of a pattern
Problem
Find the positions of all occurrences of a pattern within a string. (Thanks @DonMcCormack )
Solution
Use the pattern matching functions
source = "this is a racecar and ere noon stressed desserts for Stanley Yelnats saw Anna was there";
palindrome = (Pat Regex( "[a-zA-Z][a-zA-Z ]{0,999}" )) >> firstpart + // one or more first letters
(Pat Regex( "[a-zA-Z ]{0,1}" )) + // optional middle
...