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.

@Nithinkrishna
@geetishree.rao
@lakshman
@Nikhil_Jadhav
@nikhil.girish
@Palaniyappan
@ushu
@ppr
@Yoichi
Thanks

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

System.Text.RegularExpressions.Regex.Match(Input,"\D+").ToString

Please find attached workflow

Example.zip (2.3 KB)

1 Like

@HeartCatcher

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.