You don't always need alternation, especially if most of the stuff on either side is the same. You can use the ? quantifier to denote some parts as optional.
This example works for the input you showed, but other forms you might find might require it to change a bit.
#!/usr/bin/perl $text = <<"HERE"; U.S. Army the Army has been berry-berry good to me US-Army US Army HERE $text =~ s/(?:U.?S.?[\s-])*Army/US-Army/g; print $text;
In reply to Re: Regexp dashes at boundaries
by brian_d_foy
in thread Regexp dashes at boundaries
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |