how to remove a special characters in a given string by regex?
“philippines nt., (Roosevelt Ave 3), St@a. philippines City, @U/SA”
how to remove a special characters in a given string by regex?
“philippines nt., (Roosevelt Ave 3), St@a. philippines City, @U/SA”
Hello
Try this:
System.Text.RegularExpressions.Regex.Replace(yourStr, “[^a-z A-Z 0-9]”, “”)
Insert any extra values into the square brackets to keep them.
Cheers
Steve
Hi,
It’s necessary to clarify definition of special character.
However, how about the following?
System.Text.RegularExpressions.Regex.Replace(yourString,"[^\w\s.,]","")
Regards,
You can use this, which replces any specia character
System.Text.RegularExpressions.Regex.Replace(str,"[^\w\s]","")
Cheers
HI try this way also
System.Text.RegularExpressions.Regex.Replace(strInput,"[@.,\\\/]+","").Trim
output : -
can just try with this regex
Use an assign activity with the expression
yourString = System.Text.RegularExpressions.Regex.Replace(yourString, "[^a-zA-Z0-9\s]", "")
Explanation
Hope this clarifies
Cheers @sai_gupta
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.