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.
In reply to Re^2: In-place editing of files
by Aristotle
in thread In-place editing of files
by richz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |