I'm using a mask to transform the input text, in real-time, in this format: 000.000.000-00 and I need to add just one word after that: 000.000.000-00A
I'm using this code, in regexp.
cpf=cpf.replace(/\D/g,"")
cpf=cpf.replace(/(\d{3})(\d)/,"$1.$2")
cpf=cpf.replace(/(\d{3})(\d)/,"$1.$2")
cpf=cpf.replace(/(\d{3})(\d{1,2})$/,"$1-$2")
What's wrong with that code? I'm using maxlength = 15.