Replacing the digits to empty value

Hi All,

I want to fetch the first and last name of a customer, the last name contains digits
like Naveen123 but I just need Naveen, please someone let me know how to replace Naveen123 to Naveen.
I.e I need to remove the numerical values only if the last name contains numerical values.


Hi @HeartCatcher

Assign str = System.Text.RegularExpressions.Regex.Replace(str ,"\d", ā€œā€)

or try this

System.Text.RegularExpressions.Regex.Replace(your string,"[\d-]",String.empty)
1 Like

@HeartCatcher You can apply regex


Please find attached workflow (2.3 KB)

1 Like


Try below expression.

   lastName = System.Text.RegularExpressions.Regex.Replace(LastName, ā€œ\dā€, ā€œā€)
1 Like

Hi @HeartCatcher

if you have no more doubts kindly close the topic and mark as solution

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.