Brilliant. I changed the regex to .*⇢ %Variable%local_Exclude%.*\n
and it works nicely. Thanks @_jims!
I tried to automatically escape special characters, but it doesn't seem to do anything. Any idea what's wrong with it? Be handy to know for other applications.
Edit:
This action works:
Escape Regex Special Characters.kmactions (643 Bytes)