> > There's a simpler case which exhibits behaviour that is unexpected:
> >
> 
> In your "simpler case", I think it's doing exactly the documented 
> behavior, and demonstrates precisely the reason for the existence of 
> lastIndex.  When a regexp.test() returns true, it sets lastIndex to
> where it found the first match that follows the pre-call lastIndex
> position.

OK, that is actually documented in the Definitive Guide (Flanagan) under
RegExp.lastIndex. But confusingly not under RegExp.test() though it does
refer to lastIndex.

Hugh

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to