in reply to find and replace

Hi,

You can try this.

$input=~s#(<exp>)(.+?)(</exp>)#$1.Replace($2).$3#eg; sub Replace { my ($line)=@_; $line=~s#([a-zA-Z]+)#<it>$1</it>#g; $line=~s#(&[0-9]*)<it>([^;]+)</it>(;)#$1$2$3#g; return $line; }

Regards,

Gopal.R