- or download this
$text = "U.S. Army\nthe Army has been berry-berry good to me\nUS-Army\
+nUS Army\n";
$text =~ s/\bArmy\b|U\.S\. Army/US-Army/g;
- or download this
US-Army
the US-Army has been berry-berry good to me
US-US-Army
US US-Army
- or download this
while ($text =~ s/\bArmy\b|U\.S\. Army/US-Army/g) {
print "$text\n\n";
}