FoundPos is the same thing as MatchObj.Pos. E.g.:
What would happen if you had a named sub pattern called Pos?
Maybe if MatchObj had a setup like this.
Code: Select all
MatchObj := RegExMatch("Testing 123", "(\w+)\s(?<subpattern>\d+)")
Non named sup patterns:
MatchObj.1 MatchObj.2 ( or MatchObj[1], etc )
Named sub patterns:
MatchObj.subpattern ( or MatchObj["subpattern"] )
Both of these could also allow for specific .length's and .pos's .
MatchObj.subpattern.length and matchObj.1.pos
It would also allow for easy iteration with a For loop.
Code: Select all
For key, val in MatchObj
{
length := val.length
MsgBox, Match %key% has a length of %length%
}