Highlight word in DT in shiny based on regex
问题 Using DT in shiny, I want to be able to highlight the selected word. Setting searchHighlight = TRUE is close to what I want, but this will also highlight words that include the search. For example, if I am searching for "on" it will also match "stone", highlighting the "on" in the middle. EXAMPLE IMAGE: I can refine the search options so regex = TRUE , but then no highlighting occurs. This is also true if I want to use regex like "on|in", for example. EXAMPLE (including regex): library(shiny)