#30291
Patrick C
Participant

Hello Yutaka,

Thank you for your feedback so far!

This is currently by design, as ” and // are given higher priority than other general highlights.

Perhaps you missed my last example, where " and // are disabled and only regex highlighting is used (guess I posted too many examples).

Motivated by your response, I’ve now looked into this a bit deeper and narrowed down the cause.
The problem arises when a regex matches multiple characters, i.e. when using * or + or {3,} etc.

The following is an updated example, putting aside " and //:
Two regex matches are active, all string and comment matches are disabled.

″.*?″ regex match 1/2
%%.*$ regex match 2/2

Same problem:
EmEditor stops matching ″.*?″ as soon as it encounters %%.*$, even though the regex match for ″.*?″ has not yet been completed.

Update example.

Would this be difficult to fix?
Because it is a serious limitation. One could write much more accurate highlighters than what is currently possible.

Your help is greatly appreciated.
Many thanks!
Patrick