www.delorie.com/gnu/docs/regex/regex_60.html   search  
 
Buy the book!


Regex

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.2.6 Freeing POSIX Pattern Buffers

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).


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003