in reply to Re^3: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...) (js)
in thread Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
It works just fine. Try pasting the following into your url bar:
javascript:alert("ZBBBCZZ".match(/((.)\2*)/g))
That should alert the output of .toString() called on the array result.
If you have Firefox use the following to see the unadulterated array source:
javascript:alert(("ZBBBCZZ".match(/((.)\2*)/g)).toSource())
-David
Update: Does that imply that Javascript has different capture semantics than perl?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...) (js)
by tye (Sage) on Sep 14, 2007 at 06:36 UTC | |
by pKai (Priest) on Sep 22, 2007 at 10:54 UTC |
In Section
Meditations