From Xojo Documentation
Finds SearchPattern in TargetString, beginning at SearchStartPosition.
SearchStartPosition is zero-based.
If it succeeds, it returns a RegExMatch. Both parameters are optional; if TargetString is omitted, it assumes the previous TargetString, so you will want to pass a TargetString the first time you call Search. If you call Search with a TargetString and omit SearchStartPosition, zero is assumed. If you call Search with no parameters after initially passing a TargetString, it assumes the previous TargetString and will begin the search where it left off in the previous call. This is the easiest way to find the next occurrence of SearchPattern in TargetString.
The RegExMatch will remember the ReplacementPattern specified at the time of the search.
This example finds occurrences of "software" in the supplied string. Note that RegEx searches are case-insensitive by default so "software" is found twice: