use strict;
my $str = 'import lodash from \'lodash\';
window._ = lodash;
import angular from \'angular\';
window.angular = angular;
import \'angular-ui-router\';
import \'angular-ui-mask\';
import \'angular-sanitize\';
import \'angular-cookies\';
import \'ng-dialog\';
import moment from \'moment\';
window.moment = moment;
import ff from \'angular-ff\';
window.ff = ff;
import \'angular-ff-restful\';
import \'angular-ff-loading\';
import \'angular-ff-auth\';
// TODO импортируем auth provider
//import \'angular-ff-auth-oauth\';
/*
aaaaa-ssss;
*/';
my $regex = qr/(\/\*[\wа-я\'\-\;\s\r\n\*]*\*\/)|(\/\/[\wа-я\s\'\-\;]*)|(\<![\-\-\sа-я\w\>\/]*\>)/p;
my $subst = '';
my $result = $str =~ s/$regex/$subst/rg;
print "The result of the substitution is' $result\n";
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html