Change NNNN with NN pattern