How to eliminate special characters

I’m using UiPath StudioX to download invoices from a website. I have an Excel file that contains both the invoice number and PO number, which I use as filters to download the files. After downloading, I rename the files using the PO number and invoice number. However, some of the invoice numbers contain special characters (like ; and :), which prevent me from saving the files. How can I fix this? Keep in mind that I cannot remove those from the invoice number/PO number in my Excel file, otherwise when the bot inserts this as filters, nothing will return.

TIA

@nathalia.fawcett

Welcome to the community

You can use the below expression to remove any special character

System.Text.RegularExpressions.Regex.Replace(yourstringVariable,"\W","") this will replace all non word characters

Cheers

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