I need to parse a text string that is comma delimited into multiple substrings, but I have no idea how to achieve this with regex.
The full string looks something like this:
Barwon Heads Rd, Bridgewater Crct, Carter Rd, Freshwater Dr, Wild Oak Ave, Armstrong Creek
The last substring (following the final common, in the above case "Armstrong Creek", is the TOWN)
The other substrings between all the commas are street names.
I need to pass these into variables Street1, Street2, Street3 ... StreetN and Town
The length of the full string will vary from 1 street + town to 15 Streets + town. For example:
(note Ive BOLDED the town, it isnt bolded on the website)
Cheviot Tce, Ocean Grove
Coastside Dr, Decourcy Way, Glide Way, Lampard St, Noosa Crct, Sirrom Cres, Sunshine Ave, Armstrong Creek
Gwendoline Ct, Lowndes Ct, Lowndes Rd, Bannockburn
Any idea how to achieve this?
You can see what i mean at this URL: https://www.barwonwater.vic.gov.au/water-and-waste/alerts-and-updates