i want to write a regex that will give me all chars that are in between exactly 3 digits. for example:
111a333b444 will return a and b. however, 1111a333b444 will return only b because there are more than 3 digits to the left of a.
because there is an issue of overlapping here i used a look ahead regex such as:
matches = re.finditer(r'(?=([\d]{3}(.){1}[\d]{3}))',str) but in the second example above it also matches 111a333.
anyone has an idea for a regex that will match?
thanks a lot
Try this
See it here on Regexr