I'm trying to match words but without the first or all duplicate letters at the beginning Ex:
AADBE -> match: DBE
AAADKER -> match: DKER
DDDDDDKER -> match: KER
ADEDE -> match: DEDE
I tried to use look-behind but for some reason the prioritization doesn't work correctly and it's quite far of:
/(?<=\s(\2([A-Z])|[A-Z]))[A-Z]+/
There's probably a much easier way to do this.