Syntactic Confectionery Delight | |
PerlMonks |
Re: Re: Removing html comments with regexby esh (Pilgrim) |
on Aug 23, 2003 at 06:33 UTC ( [id://286019]=note: print w/replies, xml ) | Need Help?? |
You have provided a regular expression and some sample data. You say that the regular expression removes "snippet of code" from your sample data, but it does not. Here, I've adapted blokhead's framework and plugged in your regular expression and your data: The output is: If you want to have someone debug your problem, you'll have to provide the real regular expression you're using or the real data. (And, yes, I did test it out with multi-line comments, too.) BTW, $comments is a little strange as a name for text which includes more than just comments. Are you sure that it contains the snippet of code before you apply the regular expression? -- Eric Hammond
In Section
Seekers of Perl Wisdom
|
|