#ifndef H_CORAL_REGEXP
#define H_CORAL_REGEXP
// This file is part of the Coral project.
// Please read the copyright notice in the LICENSE file.

#include <sys/types.h>
#include <regex.h>


namespace coral {

struct RE {
	regex_t re;
	RE(const char* pattern, int flags);
	~RE() throw ();
	int executeRE(const char* a_string,
		    size_t nmatch,
		    regmatch_t pmatch[],
		    int eflags) {
		return regexec(&re,
			       a_string,
			       nmatch,
			       pmatch,
			       eflags);
	}
};

}

#endif
