EmEditor (text editor) Forum Index
   EmEditor Core Bug Reports
     RegExp highlighting sometimes matches inside strings and comments
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
Jibz
Posted on: 8/26/2010 5:13 am
Just popping in
Joined: 8/26/2010
From:
Posts: 9
RegExp highlighting sometimes matches inside strings and comments
To reproduce, create a C++ file with

char *foo =
"5" // 5
 "5" // 5
;

Add a regexp highlight string of \d+ (match digits).

The 5 inside the string and comment in the first line are not highlighted, but in the second line (which starts with one space) they are.
Yutaka
Posted on: 8/26/2010 9:59 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: RegExp highlighting sometimes matches inside strings and comments
Hello Jibz,

I am sorry but I couldn't reproduce your issue. Did you add \d+ as a regular expression at the bottom of the list of highlight strings in the Highlight (1) tab of C++ configuration properties?


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

Jibz
Posted on: 8/26/2010 10:31 am
Just popping in
Joined: 8/26/2010
From:
Posts: 9
Re: RegExp highlighting sometimes matches inside strings and comments
Yes, I added it last with only Regular Expression ticked.

I had added it with color number 8 to make it easy to spot, and now that I try again I can see it only does it when I select one of the colors with a background color in it (1, 8, 9 or 10).
Yutaka
Posted on: 8/26/2010 12:06 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: RegExp highlighting sometimes matches inside strings and comments
Hello Jibz,

I reproduce the issue now by the way you described.
I will look into this issue.
Thanks!


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

Threaded | Newest First Previous Topic | Next Topic | Top


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