use Regexp::Common; $string =~ s/$RE{comment}{C}//g;
Note that this (just like the regexes presented in the rest of this thread) isn't context aware, and happily removes "comments" from strings.
Abigail
In reply to Re: removing C style comments from text files
by Abigail-II
in thread removing C style comments from text files
by ctp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |