in reply to Regex Question
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.
|
---|