Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

regexmatch.h File Reference


Detailed Description

Regex manipulation.

#include <regex.h>

Go to the source code of this file.

Defines

#define AW_REGEX_FLAGS   (REG_EXTENDED|REG_NEWLINE)
#define AW_REGEX_MAX_PMATCHES   10

Functions

byte_t * aw_regsub (const byte_t *string, const regmatch_t *pmatch, const byte_t *substitution)
 Return a malloc'd string with all:
\0 substituded with pmatch[0] \1 substituded with pmatch[1] ... \9 substituded with pmatch[9]
NOTE: assumes pmatch is of size AW_REGEX_MAX_PMATCHES !!!


Define Documentation

#define AW_REGEX_FLAGS   (REG_EXTENDED|REG_NEWLINE)
 

How we compile our regexs

#define AW_REGEX_MAX_PMATCHES   10
 

Max number of pattern substitutions we allow.

\0 thru \9


Function Documentation

byte_t* aw_regsub (  const byte_t *  string,
const regmatch_t *  pmatch,
const byte_t *  substitution
) 
 

Return a malloc'd string with all:

\0 substituded with pmatch[0] \1 substituded with pmatch[1] ... \9 substituded with pmatch[9]
NOTE: assumes pmatch is of size AW_REGEX_MAX_PMATCHES !!!

aw_regsub

Parameters:
string Matched string
pmatch Regex match results
substitution Substitution string

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)