I thought I had this figured out, but I'm wanting to find all occurances in a file where I have some text to delete between two double quotes.
I need to find a match first and then get everything from the first double quote to the match and then all the text to the second double quote and delete it. I don't want to just get text between two double quotes, as it may not be something in that file that I want to delete.
I used something like this:
perl -p -i.bak -e s/bar/foo/g bar.xml
first to do a find and replace that worked. Then I went to:
perl -p -i.bak -e s/..\/..\/bar\//g bar.xml
and that deleted everything up to bar, but I need to continue all the way to the second double quote and I'm not sure how to do that with Perl.
I assume it will be some regex mixed in, but nothing I've tried has worked. The part up to bar will always be the same, but the text will change after that point, however, it will always end with the second double quote for the part I want to delete. There will be text again after that point.