[Gambas-user] New highlighting component (episode 2)
T Lee Davidson
t.lee.davidson at gmail.com
Sun Oct 29 12:30:22 CET 2023
On 10/28/23 18:50, Bruce Steers wrote:
> It is # anywhere in a line starts a comment just NOT if it is inside {curly braces}
> i changed
> from #
> to be...
> from /#\s/
>
> but it's a workaround as i do not know syntax for # if it's not inside { }
I'm not strong on regular expressions either. But, I seem to remember reading something about 'look-ahead' and 'look-behind'
matching. If my recall is not faulty, perhaps if a '#' in encountered, look behind to see if there is a '{' and look ahead to
see if there is a '}'.
--
Lee
More information about the User
mailing list