Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

tcregex.c File Reference

Regex substitution implementation from tclib. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <regex.h>
#include "tcrip.h"

Go to the source code of this file.

Typedefs

typedef regsub regsub_t

Functions

static char * rs_lookup (char *n, void *d)
char * tcregsub (const char *str, const char *pat, const char *sub, int cflags)
 Regex substitution.


Detailed Description

Regex substitution implementation from tclib.

Definition in file tcregex.c.


Typedef Documentation

typedef struct regsub regsub_t
 


Function Documentation

static char* rs_lookup char *  n,
void *  d
[static]
 

Definition at line 75 of file tcregex.c.

References regsub::m, regsub::rx, and regsub::s.

Referenced by tcregsub().

char* tcregsub const char *  str,
const char *  pat,
const char *  sub,
int  cflags
 

Regex substitution.

Parameters:
str The string to do substitution on
pat The regex
sub The substituent, using ${N} = 0...9 as placeholders for groups
cflags The cflags to pass to regcomp
Returns:
The new malloc'd string

Definition at line 96 of file tcregex.c.

References regsub::m, rs_lookup(), regsub::rx, regsub::s, tcstrexp(), TCSTREXP_FREE, and TCSTREXP_KEEPUNDEF.

Referenced by ffregex_do_replace(), and tcstrexp().


Generated on Thu Jun 2 23:16:59 2005 for FinFlect by  doxygen 1.4.2