I have this string:
of cabbages and kings and more kings
I want to match based on this criteria:
- Any instance of "king"
- Any instances of "cab" OR "goat"
- No instances of "bill"
This regex works for IsMatch():
^(?=.*?(king))(?=.*?(cab|goat))(?=.*?(bill))
But it just returns 1 group with a 0 length. Is there a way to have it return matching groups so that we can read the matched text after?