I have to decode the frames. Frames are in the long string and the beginning of the frame is "CC" and end of the frame is "DD". I'd like to capture everything as it is between the header and footer.
I've found all frames and I did put them into array. The array sample looks like:
CCdatadfhdfghata1DD
CC3DD
CCdatazxczxczxczxdata3DD
Now I'd like to strip out the header and the footer from the these frames. So I've prepared the RegEx:
[^CC][a-zA-Z0-9]+[^DD]
However, it won't make a match for the frame with the content 3. Why? Shouldn't the [a-zA-Z0-9]+
expression cover it? I expect:
datadfhdfghata1
3
datazxczxczxczxdata3
Instead I see:
datadfhdfghata1
datazxczxczxczxdata3