Overlapping Regex matches

  • Thread starter Thread starter Jim_Kanepele
  • Start date Start date
J

Jim_Kanepele

I have been looking for this all day and night.
Am I right to say this is not possible with Regex?

Example input string: NVNVNNRVN
I'd like to match all NVN occurrences.

NVNVNNRVN
match 1: NVN
match 2: NVN
(overlaps here)

Thanks for your help.

Best regards,
Jim
 
don't know if there is a more elegant solution, but this works for me
given your example:

N(?=VN)

hth,
Baileys
 
Back
Top