The Substrings In collection contains the matches in the specified source.
You can look for matches in the System Clipboard, in a Named Clipboard, in a variable, or in a file.
You can scan for exact string matches, case insensitive string matches, or regular expression matches.
The result, stored in the For Each action variable, can be either the matched string, the position of the match or the range (position,length) of the match.
So, let's assume you've used a variable theRange to store the range in a For Each action.
It can be referenced by:
The range is a comma separated list of values:
So the the normal Keyboard Maestro substring notation works with it.
It's all too easy to get misdirected into thinking the numbers reference match 1, match 2 – but this is not the case.
Here's a practical example