Basically the same, but substitute "\1",etc by "$1"etc...
perl -e '$kk="AAK6615B__S_KhushkKhairMFaqir";$kk=~s/(.*)_[A-Z]_(.*)/$1 +_$2/;print "$kk\n"'
Prints:
AAK6615B__KhushkKhairMFaqir
citromatik
In reply to Re: regular expression question
by citromatik
in thread regular expression question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |