Javascript regex to match string not preceded by - this question has answer here: javascript: negative lookbehind equivalent? 9 answers i've seen few answers deal question unable them work. what regex match "logged_in" not match "not_logged_in"? ^logged_in$ first come mind Get link Facebook Twitter Pinterest Email Other Apps