Hi
Need help to format a number
24555333000141 entered in a form
Formated as
24.555.333/0001-41
regards,
Paulo Novas
Hi
Need help to format a number
24555333000141 entered in a form
Formated as
24.555.333/0001-41
regards,
Paulo Novas
5 text slice and a template column but Iād probably ask chat GPT for a little Java script
Javascript with regex pattern would better. I tried using template with pattern matching first. It requires too much work.
return p1.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/, "$1.$2.$3/$4-$5")
Please convert it to a string first:
return p1.toString().replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, '$1.$2.$3/$4-$5');
I am sorry. I assumed that you are storing that long number as a string. if it is a number then you have to convert it to a string as suggested by @ThinhDinh
Hi
Many thanks, working perfect!
regards,