Use $RE{comment}{JavaScript} from Regexp::Common::comment:
use warnings; use strict; use Regexp::Common qw/comment/; my $sample = <<'END_SAMPLE'; Hello // World a /* test */ b xyz /* asdf qwertz /* uiop */ ijk END_SAMPLE $sample =~ s/$RE{comment}{JavaScript}//g; print $sample; __END__ Hello a b xyz ijk
In reply to Re: Comments regex
by haukex
in thread Comments regex
by kepler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |