while(my $line=<DATA>){ $_ .= $line } s/(u)\W?(s)\W?\s*\W?\s*(army)/uc($1.$2).'-'.ucfirst$3/gieo; print # STDOUT: # # US-Army # the US-Army has been # US-Army # USA Army . US-Army __DATA__ U.S. Army the US army has been US - Army USA Army . U-S- Army
In reply to Re: Regexp dashes at boundaries
by sh1tn
in thread Regexp dashes at boundaries
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |