How to remove first Tab in txt file?

Hello everybody,
i need to delete from text file only the first tab for each row .

How can i do??

Thanks guys!

1 Like

Hey @l.sambinelli

Read the text file into a string. Then perform the below in Assign.

str_Text = String.Join(Environment.Newline,str_Text.Split(Environment.Newline.ToCharArray).Select(Function(line) line.TrimStart))

Then you can write it back to the Text File.

Hope that helps.


Hi @l.sambinelli,

Can you share how the robot sees the character here?




you can pass the generated text into generate data table using space as you separator and the output will be on a table
next use remove data column- for the first column(0), you will be left with the rest of the data to be outputted as a table or test .
i hope this works
from Julius Atagana


Read file as string and remove line space using string.replace.

Hey @l.sambinelli

I would suggest using a Regex.Replace (with Multiline enabled). And write the result back to a new Text file (or the original).

Preview the Regex pattern with your sample data. It will only replace at the start of each line.

Take a look at this workflow. Main.xaml (6.7 KB)
Note the RAW Text in Red and the CLEAN Text in Orange.

Further to @muhammedyuzuak’s post - if you share a Sample file we could understand more about the text and develop some more robust options.



Thanks your idea is perfect! i never used multiline option with regex activity!
I really appreciate it

1 Like

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