From an alphanumeric string I need to pick all two digit numbers.
e.g.: input = 'abc123#d$45^abrt&89*'
output = [45, 89]
When I do it picks two digits even from three digit numbers.
The numbers can be anywhere in the string – start, middle or end. Also, the anchors can be anything (except numbers, of course.)
Please suggest if it is better to use regex or to go with other string operations.
Will be helpful if a python code is provided.
You need lookaround assertions: