To free any allocated fields of a pattern buffer, use:
void
regfree (regex_t *preg)
preg is the pattern buffer whose allocated fields you want freed.
regfree also sets preg's allocated and used
fields to zero. After freeing a pattern buffer, you need to again
compile a regular expression in it (see section 7.2.2 POSIX Regular Expression Compiling) before passing it to the matching function (see section 7.2.3 POSIX Matching).
Please take a moment to fill out
this visitor survey You can help support this site by
visiting the advertisers that sponsor it! (only once each, though)