Is there a way to write a regex that recognizes overlapping patterns? (any language)

32 Views Asked by At

I'm wondering if there is, for example, a way to write a regular expression that matches all of ("a.b", "b.c", "c.d") in the string "a.b.c.d".

I can only think of patterns like "\w\.\w" that match "a.b" and "c.d", but not where the two overlap.

0

There are 0 best solutions below