Consider:
my $line = '<!-- Gone > Not gone -->'; $line =~s/<![^>]*>/<!>/; print $line;
Prints:
<!> Not gone -->
which most likely is not the expected result.
In reply to Re^2: Search and Replace for XML
by GrandFather
in thread Search and Replace for XML
by srprabu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |