04-08-2017 06:28 AM
how about the following:
.*(hay) ([^h]\S*) (hay).*
The second capturing group (reflected by $2) starts with a character which is not h and uses only non-whitespace (blanks) characters. It therefore only matches "needle".
A shorter version would be .* ([^h]\S*) .* which can be reflected by $1.
Hope this helps,
04-08-2017 08:22 AM - edited 04-08-2017 08:29 AM
On this way replacing makes sense, though it's no real matching and it's some how not so flexible if I have different longer text. Anyways, now I understand the box "Replacement (for preview only)".
Thank you very much edin, I will play with it.
Meanwhile I started a new thread here...