<input type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1').replace(/^(\d{0,3})(\d{0,4})(\d{0,4})$/, `$1-$2-$3`).replace(/\-{1,2}$/g, '');" maxlength="13">