471,605 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Overlapping Regex matches

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

Jan 19 '06 #1
1 2626
don't know if there is a more elegant solution, but this works for me
given your example:

N(?=VN)

hth,
Baileys

Ji**********@yahoo.com wrote:
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

Jan 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by km | last post: by
1 post views Thread by André Søreng | last post: by
4 posts views Thread by Gawelek | last post: by
7 posts views Thread by bill tie | last post: by
17 posts views Thread by clintonG | last post: by
8 posts views Thread by vbmark | last post: by
5 posts views Thread by Chris | last post: by
2 posts views Thread by O.B. | last post: by
1 post views Thread by al.moorthi | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by MichaelMortimer | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.