I am facing issues when using not contains in regx
some text good foo and some text and good koo
good foo and some text (no indication of koo)
I like to filter all good foo records but no koo. In this case only 2nd record. I tried to use
.* good foo.*((?!(good koo)).)* .*
But it is flagging all the records having the word good foo
/* no indication of good koo, so expected is true) */
println("good foo and some text (no indication of koo)".matches(".*good foo.*((?!(good koo)).)* .*"))
/* indication of good koo, so expected is false) */
println("good foo and some text good koo".matches(".*good foo.*((?!(good koo)).)* .*"))