How to escape characters like ? or ' into a read range activity?

how to escape characters like ? or ’ into a read range activity?

in a foreach activity i will extract colomm information to put them into a web formulaire and It seem that I have error in my datatable with special characters…

Replace special characters with nothing like below -

yourString.Replace("?","").Replace("'","")

You can add more replaces if any.

Regards,
Karthik Byggari

4 Likes

Hi
Welcome back to uipath community
if we have any other escape characters apart from ? ’ a single regex expression can replace all of them
–so inside the FOR EACH ROW loop with datatable variable as input
use a assign activity like this
row(“yourcolumnname”) = System.Text.RegularExpressions.Regex.Replace(row(“yourcolumnname”).ToString,"[\W]+","").ToString

Cheers @lionel31

Thanks i will try this regex
with this output :
roww(“Questionnaires Chemin”).ToString

1 Like

awesome
kindly try and let know for any queries or clarification
Cheers @lionel31

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