Just can't figure out how I match IF and If but not if or ones prefixed $.
examples:
If True then // <- match
IF True then // <- match
if True then // <- don't match (lowercase i)
{SIF NOT DEFINED(SAAS)} // <- don't match (part of another word)
{$IFDEF DEBUG} // <- don't match (preceded with a $)
ChatGPT suggests:
\bIf\b(?!\$)
but it doesn't work when there's a $ before.
You don't have to use lookahead or lookbehind here, since you want to match the terms
IfandIFonly as a whole word. Simply use word boundaries: