how to remove non-numeric characters from the CPF?
for example I have a CPF 424.087.938-82
and wanted it to be 42408793882
how to remove non-numeric characters from the CPF?
for example I have a CPF 424.087.938-82
and wanted it to be 42408793882
Hi @Beatriz,
Please use Regex to extract the numbers. Use the βMatchesβ activity and enter the pattern β\d+β to get the numbers.
Hereβs an example:
Regex String.xaml (8.0 KB)
Regards,
PD
Hi Beatriz.
You can use Replace function with β.β to ββ.
CPF.Replace(β.β,ββ)
CPF.Replace(β-β,ββ)
Use Replace Activity in UiPath
Pattern- (CPF)|[.-\s]+
Input - CPF 424.087.938-82
Regex Option : (IgnoreCase, Compiled)
Replacement - String.Empty
Regards,
Mahesh