piece = subject->value.str.val;
subject_end = piece + subject->value.str.len;
match = NULL;
+ matched = 0;
do {
/* Execute the regular expression. */
/* If something has matched */
if (count >= 0) {
- matched = 1;
+ matched++;
match = piece + offsets[0];
/* If subpatters array has been passed, fill it in with values. */
piece += offsets[1];
}
}
- /* If nothing matched */
- else {
- matched = 0;
- }
} while (global && count >= 0);
/* Add the match sets to the output array and clean up */