Let's say I have a number: 6278041121932517
If I want to get 11219325
I have a regex:
re.search(r"((1|2)\d{7})", "6278041121932517")
but the fact is that it can start with 1 or 2. Therefore, I want to add a minimum buffer in advance, say 4 digits. I was thinking about look-behind, but it does not support n lengths.
source
share