How do I cut up a string text into two arrays?

Hey,

I have a block of text in the form of one string. I have got it so that it states ‘Name:’ and ‘Value:’ consistently so that I can isolate each part, but I’m not quite sure how to make it so that each item is in its own array.

Example of the text (names and values will be different each time):
Name: Metallic - Iron grey Value: £700.00, Name: Magnet dark grey cloth - Black with red twill Value: £0.00, Name: Ply-Lining XLWB Panel Van (Network) Value: £170.59, Name: roof vent Value: £200.00, Name: mats Value: £20.00

How could I get it so that all the names (between name/value) are in one array and then all the values (between value and name) are isolated into another?

You may have to spell it out for me as I’m not great at this! Thanks a lot.

@dr1992

Can you be specific please or more elaborate on what you need

cheers

I accidentally submitted before I finished writing aha

1 Like

Hi @dr1992 ,

Could you also provide us with the Expected Output for the Input Sample that was provided, we would be able to provide a more accurate solution/suggestion if this could be provided as well.

Like this:

image

Actually, a data table output like this could also work…

@dr1992

Please check this
In Build Datatabl;e make sure you assign the datatable in the output argument


output:
image

1 Like

Worked perfectly, thank you very much!

1 Like

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