I want to remove A_D11 no A_D1, how do I remove the exact string? Thanks
my $a ="A_D[1]"; print "Removing $a from \$str\n"; my $str = "123 A_D1 XYZ A_D1[1] BLAH BLAH"; print "str = $str\n"; $str =~ s/\b$a / /; print "str = $str\n";
In reply to Replacing string with [] by doofus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |