I have the pattern
\\bi\\b[^.!?]{0,10}\\bhate
which matches string only in one sentence (not divided by .!?
). But it also matches the opposite sense with not
between two words. How to exclude such occurences of not
in between two words with maximum distance of 10 between them.
Now it matches: i do not hate
. I would like to exclude that and leave only matches such as i do hate
or i hate
.