You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
374 B

#include "pcre.h"
#include <pcre.h>
#include "log.h"
void pcre_build(pcre_t *out, const char *pattern) {
const char *errptr;
int erroff;
out->re = pcre_compile(pattern, PCRE_DOLLAR_ENDONLY | PCRE_DOTALL, &errptr, &erroff, NULL);
if (!out->re)
die("Failed to compile PCRE '%s': %s (at %i)", pattern, errptr, erroff);
out->extra = pcre_study(out->re, 0, &errptr);
}