Posts by Evandson Dantas • 21 points
1 post
-
2
votes3
answers753
viewsA: CPF Regex with Laravel
In PHP you can try Regex replace this way: $cpf = '12345678968'; $cpf_maskered = preg_replace('/(\d{3})(\d{3})(\d{3})(\d{2})/','$1.$2.$3-$4', $cpf); echo $cpf_maskered; If the CPF already contains…