String processing

How to removed punctuation characters from a string…

Hi @Elifali,

Welcome to Uipath Community :smiley:

Below two ways will remove punctuation in string.If you have any issues. Let me know.

Input :%welcome’ to @geeksforgeek<s
Output=System.Text.RegularExpressions.Regex.Replace(Input, @“[^\w]”, string.Empty)
Output will show :welcome to geeksforgeeks

Second method
Regular expression:!“#$%&'()*+,-./:;?@^_{|}~ Output=System.Text.RegularExpressions.Regex.Replace(Input, @"[!"#$%&'()*+,-./:;?@[\]^_{|}~]”, string.Empty)
Input :Hello!!!, he said —and went.
Output :Hello he said and went

Regards,
Omkar P

1 Like

can you give us sample??what you are trying to do??
@Elifali

Hi @Elifali,

Please find the solution.

removed punctuation.xaml (4.7 KB)

Regards,
Omkar P

Thank you.

If it is working fine.Please mark it as solution :smiley:

2 Likes