perl -le' $_ = "..."; s/[\.-]+//g; if (/(\S)(\S)(\S)(\S)$/) { print "$1$2$3$4" } '
or just
perl -le' $_ = "..."; s/[\.-]+//g; print substr $_, -4; '
In reply to Re: why this regular expression is so slow?
by ikegami
in thread why this regular expression is so slow?
by fnever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |