Next: , Previous: , Up: regexps   [Contents][Index]


3.2 Regular expression constructors and destructors

Function: cre2_regexp_t * cre2_new (const char * pattern, int pattern_len, const cre2_options_t * opt)

Build and return a new regular expression object representing the pattern of length pattern_len bytes; the object is configured with the options in opt. If memory allocation fails: the return value is a NULL pointer.

The options object opt is duplicated in the internal state of the regular expression instance, so opt can be safely mutated or finalised after this call. If opt is NULL: the regular expression object is built with the default set of options.

Function: void cre2_delete (cre2_regexp_t * rex)

Finalise a regular expression object releasing all the associated resources.


Next: , Previous: , Up: regexps   [Contents][Index]

This document describes version 0.4.0-devel.2 of CRE2.