The notation to extract regex capture groups in UI.Vision is
regex=…@MATCH,GROUP:
My test macro:
{
"Name": "js",
"CreationDate": "2020-2-25",
"Commands": [
{
"Command": "open",
"Target": "https://en.wikipedia.org/wiki/IP_address",
"Value": ""
},
{
"Command": "sourceExtract",
"Target": "regex=172\\.\\d+\\.(\\d+)\\.\\d+@1,1",
"Value": "match1_group1"
},
{
"Command": "sourceExtract",
"Target": "regex=172\\.\\d+\\.(\\d+)\\.\\d+@3,1",
"Value": "match3_group1"
},
{
"Command": "sourceExtract",
"Target": "regex=172\\.\\d+\\.(\\d+)\\.\\d+@5,1",
"Value": "match5_group1"
},
{
"Command": "echo",
"Target": "${match1_group1}",
"Value": "green"
},
{
"Command": "echo",
"Target": "${match3_group1}",
"Value": "blue"
},
{
"Command": "echo",
"Target": "${match5_group1}",
"Value": "brown"
}
]
}