Visual dbase

All questions regarding lexer highlighting schemes are discussed here...
senendds
Posts: 11
Joined: 06.03.2015 11:14

Post by senendds »

I have a problem with this regexp:

Code: Select all

^\s*\*.*
I'm trying to tag as a comment any line in which the first non whitespace is an asterisk. But as can be seen in the image, even when the comments in line 3 and 5 are matched (they appear in green), the comment in line 7 is not.

And the only difference between the comment in 5 and in 7 are the spaces in line 6...

Is the regex wrong?
Attachments
pic1.png
pic1.png (4.26 KiB) Viewed 1363 times
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

yes: don't do \s, instead do [\x20\x09]*
senendds
Posts: 11
Joined: 06.03.2015 11:14

Post by senendds »

I'm afraid it doesn't work either.

^[\x20\x09]*\*.*
does not match the comment in line 7 nor the comment in 5...

I get that \s matches newline but even so, I don't see why my regexp shouldn't work.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

\Skip spaces on parsing\--turn it off, so spaces found by regex, lexer dialog
senendds
Posts: 11
Joined: 06.03.2015 11:14

Post by senendds »

Thanks!. That was the problem.
Locked