My target is to match pattern like this:
'4d05'
but if the pattern is found, it should repeat exactly twice; like this:
'4d054d05'
What I have tried is:
pattern = re.compile(r'([0-9,a-f][0-9,a-f][0][1-5]){2}')
But I found that the above regex would also match pattern like:
'4d054005'
How should I modify my regex to eliminate the above false match?