I need to mask a 13-character alphanumeric code field while the user types, separated by a hyphen, such as: 0DF7M3-R34X21
I'm using a function to apply the mask, so it would be applied as follows:
function mask_code(valor) { valor = valor.replace('ER', '$1-$2'); return valor; }
Thanks for the help.