want to convert one freeswitch c code snippet into lua

hi in one of my module two freeswitch C language inbuilt-functions are being used in a function and that same function I need to convert into the lua script Two function are 1st is

int switch_regex_perform (const char *field, const char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen) 

the link address of 1st function

and the second function is

void    switch_perform_substitution (switch_regex_t *re, int match_count, const char *data, const char *field_data, char *substituted, switch_size_t len, int *ovector)

the link address of second function:

I just want to know what the above functions do so that I can convert them into lua

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum