Ok so I'm really struggling to figuring this one out. There where other post on here answering this question but non of them worked out for my use case (GREP InDesign).
Input:
meelebox meelebox meeleboxmeeleduelist meeleboxuser meelebox meelebox meelebox
--
Match:
meele meele meelemeeleduelist meeleuser meele meele meele
I got \w+(?=(box))|(?<=box)\w+
to work, but I really want an expression where I only need to write the word once, as it's an expression I use a lot and that might change over time.
I thought I figured it out with this \w+(?=(box))|(?<=\2)\w+
but the \2
doesn't seem to work.