I have a case where I need to find if a string exactly does not match a word using regex in javascript.
I was trying negative lookahead.
var reg = /(?!(^Hello$))/
var a = "Hello";
var b = "something else";
console.log(reg.test(a)) // I need this to be false
console.log(reg.test(b)) // I need this to be true
How can I achieve this? In Javascript both the console log is giving true