I want to search a xml-file for all -tags changing the attribute enabled to false, which can be like this
<repository store-diff="true" description="ACS" name="ACS" enabled="true">
There are other tags as well having the enabled attribute so I need to search for lines starting with , which is quite easy, problem is the replacement string. I've tried this:
perl -p -e 's#^<repository.*enabled="true"#$1enabled="false"#g'
But no luck, no changes done to the file I try to change. Or, that's not true, it matches, but I'm not able to change ONLY enabled="true" setting it to false, it removes the rest of the line leaving it with just enabled="false"...
Should be possible according to http://refcards.com/docs/trusketti/perl-regexp/perl-regexp-refcard-a4.pdf