capture each item in comma seperated list with reg ex?
I have a comma separated list, the curve ball is, some of the items are strings with commas inside them (so I cant just exploid the string using a comma as a separator). How can I write a reg to capture the 10 items?
looks good, but there are two other curve balls I forgot to mention
The list may not have spaces between them and it may not have anything, so for example:
"item 1",,,"aaab","bbbc", "cccd"
Id need to know [2] and [3] are empty while [1], [4], [5], [6] have data...
Im not very good with regex, think ill give up on them and write a function for this instead... I was originally started writing some sort of regex that looks for either a string, a number or nothing, and copy/paste this for each element (so I can access it in the array)
Yeah, honestly a function could handle a lot more "features" in my opinion.
For example, you might have had a string with an escaped quote inside it as well:
"Normal String", "String, with comma", "String with \"Quotes\"!",1,2,3
Bookmarks