Need help on setting syntax highlight with RegEx
Hi, I'm writing some little AHK scripts to help my daily work, so I'm tweaking around the ahk syntax highlight configs.
Since I want to highlight subroutine labels of ahk script, I tried this pattern:
Which means words and a colon follows some space or right at the beginning of the line.
The "(?=s*$|s*;.*$)" part is a positive lookahead search, which means I want to have it could be followed by spaces or a line comment (; blah blah...), but it does not work as I expected, it can only be followed by spaces, once there is some comment followed, the highlight goes off.
Could anybody give me some hints how to correct it? :-)
Since I want to highlight subroutine labels of ahk script, I tried this pattern:
^s*w+:(?=s*$|s*;.*$)
Which means words and a colon follows some space or right at the beginning of the line.
The "(?=s*$|s*;.*$)" part is a positive lookahead search, which means I want to have it could be followed by spaces or a line comment (; blah blah...), but it does not work as I expected, it can only be followed by spaces, once there is some comment followed, the highlight goes off.
Could anybody give me some hints how to correct it? :-)
Don't know. Seems to work for me.
EmEditor 11.0.5, 32-bit, Boost 1.47
What's the differences?
囧 Quite weired...
I have exactly the same version.
I have exactly the same version.
EmEditor v11.0.5 (32bit)
under Win7 32bit, simplified Chinese...
under Win7 32bit, simplified Chinese...
Well, I got it.
It's because there is a line comment setting which starts with the character ";".
While the line comment setting turns off, the regex highlight works fine.
Hi Yutaka, is this a bug?
It's because there is a line comment setting which starts with the character ";".
While the line comment setting turns off, the regex highlight works fine.
Hi Yutaka, is this a bug?
Hi ToadLoadin,
Currently, this is the specification. If the Line Comment character appear in the middle of a line, then the highlight will be turn off. This is because of optimization.
Thank you,
Currently, this is the specification. If the Line Comment character appear in the middle of a line, then the highlight will be turn off. This is because of optimization.
Thank you,
6 posts in this topic