Question
3
Replies
54
Views
Accenture Brazil
Posted: December 11, 2020
Last activity: January 21, 2021
RegexReplace tab spaces not working
Hi all,
I have a requirement that is needed to save an extracted text to a CSV with a semicolon delimiter, but it's necessary to replace all the tab spaces to a semicolon, as the example below.
However, when I use the RegexReplace method at StringUtils with \t expression isn't work!
Does anyone know why or have other suggestions?
As is:
To be:
Automation:
Thanks in advance!
That method may is probably expecting a string so it is actually looking for "\t" instead of tab. I would just use a script where you can provide a special character like that.
public string ReplaceTabs(string input, char delimiter) { return input.Replace('\t', delimiter); }