EmEditor (text editor) Forum Index
   Questions and Answers about EmEditor Core
     Syntax Hilighting (Regex) Oddity?
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
CrashNBurn
Posted on: 11/25/2010 11:24 pm
Just can't stay away
Joined: 4/8/2010
From:
Posts: 130
Syntax Hilighting (Regex) Oddity?
When I do either of the following [x] Regex, Syntax Hilighters: __Quote:
1) Win(Active|Exist)\(.*
2) Win(Active|Exist)\(

Then it works: __Quote:
if(!winID:=WinExist("ahk_class TTOTAL_CMD"))


Yet, if I add one more brace to the regex: __Quote:
3) Win(Active|Exist)\(.*\)

It no longer matches: __Quote:
if(!winID:=WinExist("ahk_class TTOTAL_CMD"))

But, without quotes inside the braces, it will match: __Quote:
if(!winID:=WinExist(ahk_class TTOTAL_CMD))

Interestingly, ahk_class would normally look like: ahk_class
So a separate hilighter for keywords, doesn't break the regex (#3), but having a string inside it does?

Bug perhaps, I'm not sure, but it's definitely strange.
As there doesn't seem to be a way to indicate a Word should only be hilighted if it has braces e.g. a function.
Flat Previous Topic | Next Topic


Subject Poster Date
 » Syntax Hilighting (Regex) Oddity? CrashNBurn 11/25/2010 11:24 pm
     Re: Syntax Hilighting (Regex) Oddity? Yutaka 11/26/2010 10:28 am

Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文