UiPath – How to Remove Special Characters from a String using Regex

If you are looking to remove tabs and newlines etc. but leave alphanumeric characters from a string when using UiPath, here’s the solution.

System.Text.RegularExpressions.Regex.Replace(YOUR STRING HERE, “[^a-z A-Z 0-9]”, “”)

You need to have imported regular expressions into your project before this will work.

Import System.Text.RegularExpressions in the Imports tab