The question is, what will be regular expression for search of words sequence excluding some words in concrete part of string?
For example, for search request:
word1 * (word2 -word3 -word4) * word5
* means any number of any words, and
-word means excluding word)
Matched strings will be:
word1 word99 word2 word98 word97 word5
word1 word2 word5
word1 word99 word2 word98 WORD4 word97 word5
word1 WORD3 word2 word5
P.S. It's for search in MySQL using REGEXP operator.