Closed stoarca closed 11 years ago
I think the error is at https://github.com/mscdex/node-pcre/blob/master/src/binding.cc#L545 and https://github.com/mscdex/node-pcre/blob/master/src/binding.cc#L551
i is being incremented by only 1 instead of 2. I haven't tested to see if this is the actual problem.
@mscdex could you chip in on this please?
Should be fixed in 0dc7fd9d5.
Thnx a ton!
Actually fixed in 8549a2ff3. I'll be writing tests soon :-)
To my knowledge, if an array is returned by PCRE.exec, it must be of even length. I'm encountering some weird behavior when dealing with nested groups. Test case:
This seems like a bug. If not, what do the offsets in the array mean?