#!/usr/bin/perl -w use strict; my $name = "There is a in this string"; $name =~ s/\/(*)/i; print "$name\n"; $name = "There is a and another in this string"; $name =~ s/\/(*)/i; print "$name\n"; $name = "There is a and another in this string"; $name =~ s/\/(*)/gi; print "$name\n"; __END__ __OUTPUT__ There is a (*) in this string There is a (*) and another in this string There is a (*) and another (*) in this string