All occurrences of token: Not all the same texts are marked (highlighted)
-
Hallo,
Hello,
in the current version (v8.6.2 64-bit build time: Jan 14 2024 02:16:00) I want to select a text and then highlight it with “Style all occurrences of token”.I now realized that not all of the same texts are highlighted.
Example:
You should search for this text:
m.MASSQ.Value - m.MASSFUNTEN.Value - m.MASSE.Value - (m.MODELGROUP.Value == “1” ? 61.5 : 63.0)Text to search:
m.MASSQ.Value - m.MASSFUNTEN.Value - m.MASSE.Value - (m.MODELGROUP.Value == “1” ? 61.5 : 63.0)
and (m.MASSQ.Value - m.MASSFUNTEN.Value - m.MASSE.Value - (m.MODELGROUP.Value == “1” ? 61.5 : 63.0))
and ( m.MASSQ.Value - m.MASSFUNTEN.Value - m.MASSE.Value - (m.MODELGROUP.Value == “1” ? 61.5 : 63.0) )Only the first and last lines of the text to be searched are highlighted.
Is there a way to get the second line highlighted too?
It is absolutely necessary for my work that all the same parts of the text are highlighted.Thank you in advance for the support.
-
My experiments show that you probably have Settings > Preferences > Highlighting > Style All Occurrences of Token > ☑ Match whole word only checkmarked.
If you are going to be using that feature with partial words, or with multiple words, or with words mixed with puncuation, it’s usually best to remove that setting’s checkmark so that the styling isn’t restricted to matching “whole words”.
Explanation: When that option is checkmarked, then the beginning of the match must be a “start of word” and the end of the match must be a “start of word”. In your middle instance, the parentheses before and after are touching the match, so then the matching text isn’t at the start/end of the “whole word” unit, and thus don’t match.
If I have that unchecked, it will highlight all three; if I have it checked, it will highlight the first and second.
-
@PeterJones Thank you. Your tip solved exactly my problem. THANK YOU SO MUCH!