in reply to Re: In-place editing of files
in thread In-place editing of files
The OP says
I need to remove whitespace from the name that is in between the quotes.
So it would have to be
$ perl -pi.bak -e'substr($_,index $_,q/"/) =~ s/\s+//g if /^\s+Tag\s*{ +/ .. /^\s+}/ and /^\s+Name\b/' file.txt
Makeshifts last the longest.
|
|---|