Although it could be possible to get the library to compile with xc8, I had better luck using re2c, which is a utility that uses special syntax in your source file to produce a FSM that runs a regex.
An example from their website:
static int lex(const char *YYCURSOR) // YYCURSOR is defined as a function parameter
{ //
const char *YYMARKER; // YYMARKER is defined as a local variable
/*!re2c // start of re2c block
re2c:define:YYCTYPE = char; // configuration that defines YYCTYPE
re2c:yyfill:enable = 0; // configuration that turns off YYFILL
//
* { return 1; } // default rule with its semantic action
digit = [0-9]; // named definition of 'digit'
number = digit+; // named definition of 'number'
//
number { // a normal rule with its semantic action
printf("number\n"); // ... semantic action (continued)
return 0; // ... semantic action (continued)
} // end of semantic action
//
*/ // end of re2c block
} //
In this example the function returns 1 when the input is not a number, and returns 0 when it is.
Once this is run through re2c with the command:
re2c inputfile.re -o outputfile.c
A state machine is produced, replacing the comment in the function. This is pure C so doesn't require any libraries to be included at compile time.
Personally, I like to look at this state machine and re-write it myself, which can range from a pretty simple job to a much harder one depending on your regex.