Jump to content
Muxe Inc Forums
Sign in to follow this  
Elfy

old regexp bug

Recommended Posts

Elfy    0

String like this "^Nirvana\\(.*)$" parsed incorrectly. Bug in "\\(". It parsed as string "\(", not as "\" and regexp control symbol '('

Share this post


Link to post
Share on other sites
Quant    0

I have found similar bug in RegKeyWords (RegExp)...

 

I want to colorize {$...} pascal condition blocks as Green with RegKeyWords.

 

I have tried these two methods:

1.RegKeywords Color Lightgreen \{[^\}\{]+\}

2.RegKeywords Color Lightgreen \{\$[^\}\{]+\}

 

Example Condition Block:

 

{$DEFINE DELPHI_4_UP}

{$IFDEF VER100} {$UNDEF DELPHI_4_UP} {$ENDIF}

{$IFDEF VER110} {$UNDEF DELPHI_4_UP} {$ENDIF}

 

When "Del right spaces = ON" and "End trims right = ON"

1. First condition line is not colorized

2. Both {$ENDIF} conditions are not colorized

 

When I add space(s) to end of lines, all is ok... I think this is a BUG ! :(

Share this post


Link to post
Share on other sites
Elfy    0

It conflicts with "Comment" token. Try to comment it out.

 

I think this is not regexp bug

 

btw, "\{" == "{"

Share this post


Link to post
Share on other sites

Hi! :)

 

is this a BUG?

or just a usage-mistake in REGEXP?

 

can you make me a sample file so i can take a look at it?

(with higlight data of course)

 

Stefan/AH

Share this post


Link to post
Share on other sites
Elfy    0
is this a BUG?

or just a usage-mistake in REGEXP?

 

can you make me a sample file so i can take a look at it?

Yes, it is a bug

All you need are above.

Place original message in something.pas, RegKeyWords in .hgl and see at it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×