This is just an experiment not an actual thing I need to do
attempt /x:\[((\d),?)*\]/
String Examples
{x:[1,2,3] y:[5,6,7]}
{x:[99,32,67,57,83] y:[5,6,7]}
Is it possible to parse out the values in the array x using a single regular expression. I have tried using capture groups but they only capture the last match?
Is this something than can be done with regular expressions or is it context free?
I've tried experimenting with lazy and greedy evaluation of quantifiers but had no luck. It's like I want it to be greedy for part of the string and lazy for others.
It's easy to do in 2 passes. First extract x and the extract the values. Does this mean it can be done in one pass? (My guess is not as you could use lazy quantifiers for one and greedy for the other)