I am trying to match and replace something, but I can't get it to work. Could you please help?
I want to replace the value of bar with TEST. bar could either be followed by another ampersand or $ (end of line). I want a non-greedy match.
I am trying something like this, but it is not working.(It is always matching till end of line and it is swapping foo as well:(