my $string = "aDescriptor.Type = {\@see Star.Awt.Win#TOP}"; $string =~ s/ {\@see\s+((\w+\.)+)(\w+)#(\w+)}/ /g; # desired output would be : # aDescriptor.Type =