Another RegEx

sigh… just cannot make sense of this stuff :frowning:

I have this regEx statement which is to find “keywords”

"(?i)(?:^|(?<= ))("+keywordList+")(?:(?= )|$)"

where “keywordlist” is a string variable that is inserted into the RegEx
this works fine… however I cannot seem to figure out what needs to be added to find keywords with an “=”

I want to find COLOR in all those cases… right now it only finds the one ending with " "

Replace the lookarounds with “\b”, meaning “a word boundary”.

“(?:i)\b(” + keywordList + “)\b”

that didn’t seem to work… now it doesn’t find any of the keywords

Please post the contents of keywordList and some sample text you’re matching against.

Oh, shoot, I accidentally messed up the pattern.

"(?i)\\b(" + keywordList + ")\\b"

Ironically, that switch isn’t really necessary.