in reply to need regular expression

hi i am new to perl, i have a doubt

Read perlintro#Simple substitution

s/foo/bar/; # replaces foo with bar in $_ $a =~ s/foo/bar/; # replaces foo with bar in $a $a =~ s/foo/bar/g; # replaces ALL INSTANCES of foo with bar in $a
Combine with anchor
$ end of string
perlintro also explains the safety net and string literals