Having the following regular expression:
([a-z])([0-9])\1
It matches a5a, is there any way for it to also match a5b, a5c, a5d and so on?
EDIT: Okay, I understand that I could just use ([a-z])([0-9])([a-z]) but I’ve a very long and complicated regular expression (matching sub-sub-sub-…-domains or matching an IPv4 address) that would really benefit from the behavior described above. Is that somehow possible to achieve with backreferences or anything else?
Anon. answer is what I need, but it seems to be erroneous.
You don’t need back references if the second letter is independent of the first, right?
EDIT
If you just don’t want to repeat the last part over and over again, then:
Just taking away the ‘+’.