I have a string:
"3, V, 11, H, 21, H"
and I am trying to get
int first = 3
int second = 11
int third = 21
I'm not exactly sure how to do this since the numbers could be one or two digits, there are non-digit characters between the numbers, and I have to capture multiple numbers. I tried regex but then I'm left with "31121" which does not indicate what the three numbers are.
I tried regex but then I'm left with "31121"Can we see your code that generates this output? Also it seems that your data are in formatnumber, data, number, data, number, data,.... In that case you can just split your input on comma and parse every even indexed elements to integers.