in reply to Re: regex doubt on excludingin thread regex doubt on excluding
How about this?
$string =~ s/^\s*?\n$/\n/mg; [download]
UPDATE: the regex is not working properly but this should, the \n and the $ are somewhat duplicate:
$string =~ s/^\s*?\n/\n/mg; [download]
Thank you hdb... it worked...
its working with $string =~ s/^\s*?\n/\n/mg; too... :-)