Z
zoltan
Hi,
I am using a function called regexec() as defined in the regex.h
header in libc.a.
I am coding on Solaris 8 machine. The function is defined as follows :
int regexec(const regex_t * preg, char * string, (size_t)
nmatch,regmatch_t pmatch[],int eflags);
My Query is this :
How do I use the pmatch[] field to display the subexpressions which
match?
For instance, if I want to simply match the string with the regular
expression, I can
define the nmatch field to be 0 and pmatch[] as NULL. However, I
require to obtain
the subexpressions using pmatch[].... Can anyone give some practical
examples?
Thanks and Regards,
Timmy Jose.
I am using a function called regexec() as defined in the regex.h
header in libc.a.
I am coding on Solaris 8 machine. The function is defined as follows :
int regexec(const regex_t * preg, char * string, (size_t)
nmatch,regmatch_t pmatch[],int eflags);
My Query is this :
How do I use the pmatch[] field to display the subexpressions which
match?
For instance, if I want to simply match the string with the regular
expression, I can
define the nmatch field to be 0 and pmatch[] as NULL. However, I
require to obtain
the subexpressions using pmatch[].... Can anyone give some practical
examples?
Thanks and Regards,
Timmy Jose.