I want to check if specific word appears before another word? If it appears it must not match, if doesn't appear it must match, there can be other words between them
Here is example string: My name is Jack Brown
I want to check if name
word appears before Jack
, here is my regex:
regex: (?<!name)\b(Jack)\b
but untortunately it works only when there is no any words between them, can someone help?