I have the following pattern, AXDAAM904A-FQR004 ADAEM100A-FKR019 CTDAGM264A-FGR0076
and I wish to extract only a portion of it, i.e., the highlighted portions have to be trimmed off.
DAAM904A-FQ
DAEM100A-FK
DAGM264A-FG
I am facing an issue when trying to detect the A and AX using Lookbehind. It tells me that the quantifier has to be fixed, so I am not able to zero into A while, I can do it easily for CT and AX.
Help would be most appreciated, thanks in advance!
Thank you for your fast response, this works like a charm but I forgot to mention one more point,
CT, A, AX are all prefixes while R and whatever comes after that is a Subfix.
CTXXXXXXRYYYY
X and Y is not fixed in size, which is why I decided to go for that approach.
Also, I only need whats inbetween the Prefixes and Subfixes which come in varying formats
I will show few more examples:
AXDAEM100A-FKR005
ASAE10C-FKR0190
CTVAE1B-GKR2500
Is there any way to look Ahead of AX|A|CT and look behind R?