-
Hi, I came to CotEditor because I wanted a text editor that had a regex engine with granular support for unicode properties. Very pleased with CotEditor's implementation of the ICU Regex engine. I'm playing around with find and replace and testing out different regex strings. What do the colors mean when using Find All or Highlight All? At first I thought each capture group gets its own color, but playing around more I'm puzzled at the difference of the highlight colors when comparing the text editor window and the highlights of matches in the find and replace modal window. I did check the help files and searched issues, discussions,and wiki here on github, didn't see what I was looking for. Could someone explain this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Your interpretation is correct. The reason the first The highlighting of the CotEditor’s search results automatically generates color variations based on the number of capture groups used in the regular expression pattern. Each capture group is assigned a different color.
Indeed, the bundled user guide doesn’t provide an explicit explanation of the highlight colors used for text search. |
Beta Was this translation helpful? Give feedback.
Your interpretation is correct.
The highlight colors in the result view in the Find window and the editor must be the same.
The reason the first
abcdefhij
is single-colored in the screenshot you provided is that the substring is selected in the editor, and the background color of the selection takes precedence.When deselected it, the highlight should match the color displayed in the results view of the Find window.
The highlighting of the CotEditor’s search results automatically generates color variations based on the number of capture groups used in the regular expression pattern. Each capture group is assigned a different color.
…