regexp in javascript.lang (again)

[email protected] Tue, 02 Sep 2008 08:55:37 -0500
Newsgroups gmane.comp.gnu.source-highlight.general
Message-ID <[email protected]>
I think the current regexp in javascript.lang matches too much:

regexp = '/(\\.|[^\\/])+/[gim]*(?![*/])'

This matches /* */ comments that do not span multiple lines.  (Note that 
/* */ comments that do span multiple lines are highlighted correctly as 
comments.)

I think this would fix the problem:

regexp = '/(\\.|[^*\\/])(\\.|[^\\/])*/[gim]*(?![*/])'

Does that seem reasonable? (aside from its increasing ugliness)