Regex to find whole word in text but case insensitive December 23, 2023 by Tarik Use word boundary \b in your regex, (?i)\brum\b OR Use lookahead and lookbehind, (?i)(?<= |^)rum(?= |$) DEMO