Skip to content

What do the highlight colors mean when using find and replace? #1861

Answered by 1024jp
adamlogan asked this question in Q&A
Discussion options

You must be logged in to vote

At first I thought each capture group gets its own color

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@adamlogan
Comment options

@1024jp
Comment options

Answer selected by 1024jp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants