in reply to Re^4: Regex: Matching around a word(s)
in thread Regex: Matching around a word(s)

Ah! I see what your getting at. You want this (single) output with multiple highlights:

this finds <and> matches <and> highlights matches.

So if two matches occur with say 2 x number of context words of each other, amalgamate the adjacent matches + contexts into a single output.

Hmmm. I'll have to thunk on that.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.