Posts by Filipe Andrade • 1 point
1 post
-
0
votes6
answers21461
viewsA: Format numerical sequence in CPF format with tabs using javascript
Small improvement in the example with regex with tolerance to nulos or undefined function formatCpf(text) { const badchars = /[^\d]/g const mask = /(\d{3})(\d{3})(\d{3})(\d{2})/ const cpf = new…
javascriptanswered Filipe Andrade 1