Splitting a string through /t

Hi Everyone!

I’m trying to split the content of a raw text :
splittedFinal= “\tN°\tAttività\tPr\tCr\tInfo\tClient”

with the assign activity: splittedItems → mystring.split(“/t”)

unfortunately the output is an array not splitted at all:

Can someone help me understanding why i cant use the Split function to separate a string through “/t”?
(I tried also with function splittedItems= Split(splittedFinal, “/t”), but it’s still not working)

Hi @Francesca_Piras

use the below

str_arr = Split(spilttedFinal,“\t”)

Try it and let me know if it works

Regards,
Nived N
Happy Automation

Already tried, not working

Hi @Francesca_Piras

but it is is working for me actually using Split(str_var,“\t”)
check the below workflow
Main.xaml (8.2 KB)

Regards,
Nived N
Happy Automation

I imported your code in my project and here’s the result:

still not working, it looks like the string has something wrong.

1 Like

Hi @Francesca_Piras,

Can you try this expression

> System.Text.RegularExpressions.Regex.Split("\tN°\tAttività\tPr\tCr\tInfo\tClient","\\t")

1 Like

I believe that \t in your text is the escape sequence for the tab character. If that is the case, then you should be able to split the string like this:

splittedItems = Split(splittedFinal, vbTab)

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