I want to select the word "hazardous" only if it is a separate word and not with "non " or "non-"before it.
eg:
non-hazardous
non hazardous
hazardous
non agricultural hazardous
regex 1: ^(?!non[-/s]?)hazardous$
regex 2: ^(?!non-|non\s)hazardous$
I tried the above two regex and it gave correct results for the first 3 sentences, but it's not selecting hazardous in 4th sentence. I want to select hazardous in 4th sentence as it doesn't have "non " or "non-" before it
Reference: Regular Expression - Match pattern that does not contain a string