I need help with splitting a data

Hello everybody,
I have data as below in each row ,
0.00 0.54 0.04 23.1 7.9 0.0 0.0 24.0 7.3 3.4 0.0 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.93 0.93 -3.2 -3.2 0.1 860.5 6.75 24.7 30.9 28.4

I need to extract each set of numbers into different columns . The numbers of spaces between the numbers vary depending on whether there are 1,2 or 3 digits before the decimals.

Cell splitter node and delimiter as space , is not working since the number of spaces vary.

I tried Regex Split node , but I am not able to find the correct pattern to split

Can anyone suggest any other methods or ideas ?

Thank you

hi @sriram5608
You can replace multiple spaces with a single one using this expression in a String Manipulation node
strip(regexReplace($string$, " +", " ")) before using a Cell Splitter

2 Likes

@sriram5608

Strange that the CellSplitter node and delimiter as space doesn’t work, because there is the option

Remove leading and trailing white space chars (trim)
If checked, leading and trailing white spaces of each part (token) will be deleted.

gr. Hans

1 Like

Thank you @duristef . Your method worked well.

1 Like

I did try your suggestion before posting but for some reason it was not working.

Thanks for your suggestion

2 Likes

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