I don't use \s because that would remove the newline character at the end of the line too.perl -ne 'if (/^<item>/){s/[ \t]+/ /g;print;}' test.txt
In reply to Re: formatting text
by waldner
in thread formatting text
by texuser74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |