On 4/26/05, N. Ganesh Babu wrote: > Dear Offer Kaye, > > I want to preserve the <u> tag also in the context. Can you help me how to > do it. If you run 2nd time also the same action will happen. If we remove, > in the 2nd execution again the conversion will take place on these words. >
Hi Ganesh, I'm not following you - that do you mean "context"? What "2nd execution"? Wild guess- you want the final line output from the code to include the <u> tags? If so, simply use: $line=~s!(<u>.+?</u>)!push @un,$1;"<u></u>"!ige; So now the tags as well as the text are saved into @un and will appear in the final output line. Please read "perldoc perlrequick", it will help you learn regular expressions in Perl. You can read it online at: http://perldoc.perl.org/perlrequick.html HTH, -- Offer Kaye -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>