I have a problem with custom syntax highlighting in Notepad++.
I want to display text in parentheses in a different color. In View → User Define Dialogue I've defined a custom language and set up corresponding delimiters, "(" and ")".
However, the problem is that Notepad++ is highlighting the text between parentheses only when there is a space before the left parenthesis. So for example, in ^reg(ular)?$ (ular) is not highlighted, but in ^reg (ular)$ it is.
Is there a way to force Notepad++ to recognize delimiters without the space before parentheses?
If you add open parenthesis, "(", to the list of activated operators in the User Define [sic] Language, then the content will be highlighted between the opening and closing parentheses (which you set as the delimiters).
add ( and ) in Operators 1 es better, then if you select ) in the source, the ( is hightlighted
来源:https://stackoverflow.com/questions/5046543/highlighting-delimiters-without-spaces-before-parentheses-in-user-defined-langua