perl -e 'print qq!$_\n! for grep {length} map {s/.*(\d{7})/*$1/ ? $_ : + q!!} @ARGV;' 1234567890 1234567 1234567890123 wibble 123
Prints:
*4567890 *1234567 *7890123
In reply to Re: Trim Phone Numbers
by GrandFather
in thread Trim Phone Numbers
by kirkbrown
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |