79573864

Date: 2025-04-14 19:20:40
Score: 0.5
Natty:
Report link

It's possible that I didn't explain the issue correctly, but none of the provided answers accurately split the string or would be able to handle the large amount of data I will eventually be working with without timing out. Here's what did work for my case:

var str = 'value1,"value2,with,commas",value3';
var parts = str.split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/);
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: K K