Iam not a great guy in regular expression.
I have tried a little with regular expressions.
use strict; use warnings; undef $/; my $str; ($str=<DATA>)=~s{(((\n|^)K (.*?)(?=\n|$))+)}{"$3<p>".${($_=$1)=~s!(\n| +^)K !,%!g,\$_}."</p>"}eg; $str=~s/(<p>),/$1/g; print $str;
Please forgive any thing i have done silly in the above code.
In reply to Re: Formatting
by murugu
in thread Formatting
by mrxg4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |