help-source-highlight
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-source-highlight] regexp in javascript.lang (3rd try!)


From: Lorenzo Bettini
Subject: Re: [Help-source-highlight] regexp in javascript.lang (3rd try!)
Date: Tue, 16 Dec 2008 12:47:25 +0100
User-agent: Thunderbird 2.0.0.18 (X11/20081125)

address@hidden wrote:
Last time I suggested an ugly regexp definition for
javascript.lang to avoid matching /* */ comments:

http://lists.gnu.org/archive/html/help-source-highlight/2008-09/msg00000.html

On second thought (or third thought) I don't like this because it
matches cases where there are two division operators in a single
expression, such as:

document.write('<table><tr><td>25% = '+(25/100)+'</td></tr></table>');


mh... I'm not sure I understad: why does this happen? The other / are in strings delimited by '', aren't they?

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]