Hey guys, I'm back again struggling to understand how to format some more text
I have the following that I'm trying to split up and comma delimit (if that's the correct phrase)
msg.payload=
1Chelsea1 Burnley,0Manchester United2 Manchester City,2Crystal Palace0 Wolves,1Brentford2 Norwich City,1Brighton & Hove Albion0 Newcastle United
I tried using the function node to search with regular expressions but there's only an option to replace rather than insert which is my limit (is there another change node that could insert instead of replace?)
I'd like to achieve the following result (Basically surround each number in a single comma so that I can then build an array with the output.
1,Chelsea,1 ,Burnley,0,Manchester United,2 ,Manchester City,2,Crystal Palace,0 ,Wolves,1,Brentford,2 ,Norwich City,1,Brighton & Hove Albion,0 ,Newcastle United
I'm struggling to understand how I would use regex to find text and then insert something before or after the text