How about this?
$text = "This is not good,\n you know what I mean?\n\nThis should be o +n a separate line."; $text =~ s/[^\n](?:\n)|(\n)\n[^\n]/$1/g; print $text;
Which produces this:
This is not good,you know what I mean? This should be on a separate line.
In reply to Re: Regex Question
by ryddler
in thread Regex Question
by madhatter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |