|We've already established in your previous dozen messages that the help is
|misleading, and it will be updated.
|
|@REGEX is returning the number of matching subexpressions, which in your
|example is 5:
|
| [0] => d
| [1] =>
| [2] =>
| [3] =>
| [4] => d

They're all the same ... not exactly enlightening to the user ... all
he learns is that there was a match and that he specified 5 groups
(the entire regex being group 0) the second of which he already knew.

If the regex is "(a)|(b)|(c)|(d)", onig_match() will **always** give
region->num_regs equal to 5, even if there's no match at all. It has
nothing to do with the string. Onig_search() only finds one match per
call.