Hi Yuvi,
Thanks for the post.
An example of how one could accomplish your goal is included in the scripting manual at the following location:
https://www.vandyke.com/support/tips...ing/index.html
The example begins on page 50 with the heading of:
Using MatchIndex to Determine Which String ReadString() Detected.
Does this help you accomplish your goal?