I've got a string of text that looks like such:
...],null,null,
],
["Tuesday",["8AM–5:30PM"]
,null,null,"2018-09-25",1,[[8,0,17,30]
]
,0]
,["Wednesday",["8AM–5:30PM"]
,null,null,"2018-09-26",1,[[8,0,17,30]
]
,0]
,["Thursday",["8AM–5:30PM"]
,null,null,"2018-09-27",1,[[8,0,17,30]
],x,y,[[[.....
I know this ends with three consecutive left brackets.
I'm writing a regex to grab all the arrays starting from the first day to the end of the array of the last day, but I'm having trouble getting too much returned.
val regEx = """[a-zA-Z]*(day)(?s)(.*)(\[\[\[\")""".r
I'm using the (?s)(.*) to capture the fact that there can be newlines between day arrays.
This is essentially grabbing everything from the text following the first day rather than stopping at the [[[.
How can I resolve this issue?