#include <pcre.h>
int pcre_exec(const pcre *code, const pcre_extra *extra, const char *subject, int length, int startoffset, int options, int *ovector, int ovecsize);
This function matches a compiled regular expression against a given subject string, and returns offsets to capturing subexpressions. Its arguments are:
code Points to the compiled pattern extra Points to an associated pcre_extra structure, or is NULL subject Points to the subject string length Length of the subject string, in bytes startoffset Offset in bytes in the subject at which to start matching options Option bits ovector Points to a vector of ints for result offsets ovecsize Size of the vector (a multiple of 3)
The options are:
PCRE_ANCHORED Match only at the first position PCRE_NOTBOL Subject is not the beginning of a line PCRE_NOTEOL Subject is not the end of a line PCRE_NOTEMPTY An empty string is not a valid match PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8 validity (only relevant if PCRE_UTF8 was set at compile time)
There is a complete description of the PCRE API in the pcreapi page.