Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

One possible bug in regular expression

5 views
Skip to first unread message

shlb...@hotmail.com

unread,
Apr 10, 2008, 3:48:10 PM4/10/08
to
Hi,

I found Rhino can't parse the following line : (The error : ...
missing ")" ...)

win.location.href="/signup?
next_url="+encodeURIComponent(win.location.href.replace(/http:\/\/
[^/]*/,""));

But it can pass, after I change

win.location.href.replace(/http:\/\/[^/]*/,"") to
win.location.href.replace("http:\/\/[^/]*","")

I don't know this is a known bug or not.


Thanks,
nbruce

Norris Boyd

unread,
Apr 11, 2008, 10:46:23 AM4/11/08
to

Fixed and checked into CVS.

shlb...@hotmail.com

unread,
Apr 11, 2008, 11:24:19 AM4/11/08
to

Thanks, Norris. Can I pull down the updated files from CVS ? Is
NativeRegExp class?

Norris Boyd

unread,
Apr 11, 2008, 12:34:10 PM4/11/08
to

Yes, look under "Source" at http://www.mozilla.org/rhino/download.html

> Is
> NativeRegExp class?

No, org.mozilla.javascript.TokenStream

shlb...@hotmail.com

unread,
Apr 11, 2008, 1:21:51 PM4/11/08
to
On Apr 11, 11:34 am, Norris Boyd <norrisb...@gmail.com> wrote:
> On Apr 11, 11:24 am, shlbr...@hotmail.com wrote:
>
>
>
> > On Apr 11, 9:46 am, Norris Boyd <norrisb...@gmail.com> wrote:
>
> > > On Apr 10, 3:48 pm, shlbr...@hotmail.com wrote:
>
> > > > Hi,
>
> > > > I found Rhino can't parse the following line : (The error : ...
> > > > missing ")" ...)
>
> > > > win.location.href="/signup?
> > > > next_url="+encodeURIComponent(win.location.href.replace(/http:\/\/
> > > > [^/]*/,""));
>
> > > > But it can pass, after I change
>
> > > > win.location.href.replace(/http:\/\/[^/]*/,"") to
> > > > win.location.href.replace("http:\/\/[^/]*","")
>
> > > > I don't know this is a known bug or not.
>
> > > > Thanks,
> > > > nbruce
>
> > > Fixed and checked into CVS.
>
> > Thanks, Norris. Can I pull down the updated files from CVS ?
>
> Yes, look under "Source" athttp://www.mozilla.org/rhino/download.html

>
> > Is
> > NativeRegExp class?
>
> No, org.mozilla.javascript.TokenStream

I see. Thank you very much. :)

0 new messages