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.
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.