I thought I knew a thing or two... then I met RegEx. So what I am trying to do is a multistring negative look-ahead? Is that a thing? Basically I want to find when a 3rd string exists BUT two precursory strings do NOT.
(?i:<!((yellow thing)\s(w+\s+){0,20}(blue thing))\s(\w+\s+){0,100}(green thing))
Target String:
- Here we have a yellow thing. Here we have a blue thing. Clearly the green thing is best though. (Should NOT match)
- You wanna buy some death sticks? I have a green thing. (MATCH)
- We are on a yellow thing submarine? Look at that green thing over there! (MATCH)