Hello
I need help with parsing a String to get the content of an array. I know nothing about regular expressions, patterns, it looks so complicated… I’ve tried a few things but nothing works But I’m almost sure that it’s not that complicated for someone who know what they are doing!
The String looks like this:
"a lot of characters that
I don't need =
{ 32,0,1,2,3,
12,0,-10,13,1,
6,-1,2 }
another lot of characters
that I don't need"
It’s a long String that may contains other arrays, but the one that interests me is this one, unfortunately the array name is unknown, but it can be recognized because it always starts with 32 and is always 5 values per line except for the last line that may be less than 5 values, and the minimum amount of values in the array is 5.
Basically I would like to search the String for “{ 32,” followed by unknown amount of comma separated values until the end of the array “}”, and the resulting String would be ideally “32,0,1,2,3,12,0,-10,13,1,6,-1,2”, or similar, something that I can easily split and store in an array in my program, which can then check the content to make sure that it was really this array that it was looking for, else try search again until the end of the String.
Can someone please tell me how to do that ? Thanks in advance