>> regcomp() and regexec()
Use regcomp to compile the regex you wish to run
Use regexec to execute the regex against a target
Use regfree to free the regex created using regcomp
Use regerror to get a string version of any error codes
Usage, with examples, is documented here
http://www.opengroup.org/onlinepubs/000095399/functions/regcomp.html