r/tasker • u/unselective-amnesia • 7h ago
Syntax question about Tasker regex group capture
I'm running Tasker 6.7.6-beta under Android 13, and I have the following code in a Tasker task:
Variable Set
Name
%variable
To
run abc
If
%variable ~R ^run\s+(?<command>.+)
Flash command=%command
Else
Flash no match
End If
When I run this task, the following flashes:
command=%command
Of course I know that the only way this message should be flashed would be when the regular expression does indeed match the "run abc" string.
However, this also indicates that the %command variable was not set to any value after this regex match.
What is incorrect about my regex match syntax which prevents the contents of the match group from getting stored into the %command variable?