I'm trying to match a text string in javascript as long as it isn't a substring of a predefined word.
E.g. let's say we have these words in the file and even if there's a match, I don't want the word blue to show up in the search;
value
lunar
blue
clue
So if the user searches for lu, all the words other than blue should show up. If the user were to search for ue, only value and clue should be matched.
I tried doing a negative look ahead like this;
((?!blue)lu)
Didn't work though and I'm not sure what else to do.
clueto be in result, but notblue. Am I right?\blu\b