I need a regular expression to match a string within a longer string. Specifically I need to not match any leading zeros or the last 2 digits for the string.
For example, my input might be the following:
00009666666605
00010444444404
00007Z22222205
00033213433104
00009000G00005
And I would like to match
96666666
104444444
7Z222222
332134331
9000G000
For further information, the last 2 digits are always numbers and describe the starting point of the valid reference, after the leading zeros.
I thought I'd cracked it with something like
(?<=0000).{8}|((?<=000).{9})+? but that doesn't work as expected.
I need a regular expressionwhy must it be a RegEx?