Sorry, I should have been more clear.
has "str_find_aux" which works off of the lua_State.
I'm asking if it could be slightly refactored to call a C function which is also exported for C extensions to use
// Find the pattern p in string s.
lua_Match lua_find(
char* s, int s_len, // subject
char* p, int p_len); // pattern
And... I think I'm seeing why -- it's because that lua_Match object would be relatively complicated because of match groups. While it should be possible to define a lua_Match_next_group function or something to recursively extract the groups, I'm sure that wasn't seen as a high priority.
Thanks everyone, I answered my own question.
- Rett