30 May
2007
30 May
'07
3:40 p.m.
John Maddock wrote:
Armel Asselin wrote:
though, there are a few inconsistencies though with the ECMAScript spec. 1. it seems that re-matching an atom does not first clear its sub-matches, as "step 4" in page 135 of ECMA 262 3rd edition tells to.
that is, it does what is in the 'and not' part here:
/(z)((a+)?(b+)?(c))*/.exec("zaacbbbcac") which returns the array ["zaacbbbcac", "z", "ac", "a", undefined, "c"] and not ["zaacbbbcac", "z", "ac", "a", "bbb", "c"]
I'll look into it.
You might give xpressive (new in 1.34) a shot. It gets this one right. -- Eric Niebler Boost Consulting www.boost-consulting.com