Hi, is there an easy way to remove double carriage returns in a string with a regex replacement? I've tried using the following line without success:
perl -i.bak -p -e 's/\n\n/\n/m' inputtextThis kind of works in that it removes any blank lines. But if there were 3 or more carriage returns, I'd like to have extra spacing present in the end:
perl -i.bak -p -e 's/^\n$//' inputtextThanks
In reply to Removing double carriage return by dragooneye
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |