If that seems overly complex, then look for runs of newlines, and don't touch the ones that aren't isolated:s/(?<!\n)\n(?!\n)//g;
s/(\n+)/$1 eq "\n" ? "" : $1/eg;
-- Randal L. Schwartz, Perl hacker
In reply to Re: Regex Question
by merlyn
in thread Regex Question
by madhatter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |