use strict;
my $str = '1-FA-I2-I2-I2-EX-I2-I3-FA-I1-I2-TR-I1-I2-FA-I3-I1-FA-FA-NR-I3-I2-TR-I1-I2-I1-I2-FA-I2-I1-I3-FA-QU-I1-I2-I2-I2-NR-I2-I2-NR-I1-I2-I1-NR-I3-QU-I2-I3-QU-NR-I2-I1-NR-QU-QU-I2-I1-EX';
my $regex = qr/FA-I1-I2-TR-I1-I2-FA.*(*SKIP)(*F)|(?:I\d-?)*I3(?:-?I\d)*/mp;
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