perl -e '$kk="AAK6615B__S_KhushkKhairMFaqir";$kk=~s/(.*)_[A-Z]_(.*)/$1_$2/;print "$kk\n"' #### AAK6615B__KhushkKhairMFaqir