Reading through stack overflow examples i couldn't find a working solution for the below test case.
I need to match a pattern being tested against a list of strings..
the pattern should match if word1 exist, but word2 doesn't exist before it. Any character can exist in between.
Examples:
pattern - match if word tty_osc
exist and mov_osc
doesn't exist anywhere before it.
abd.defg.mov_osc.ccr.tty_osc.val
- doesn't match...tty_osc
exist butmov_osc
also exist beforetty_osc
abd.defg.ccr.tty_osc.val
- match -tty_osc
exist, nomov_osc
before
I've tried the following negative lookbehind regex - (?<!mov_osc).*tty_osc