AgsRegex

AgsRegex — coding-neutral regex

Stability Level

Stable, unless otherwise indicated

Functions

int ags_regcomp ()
int ags_regexec ()

Includes

#include <ags/lib/ags_regex.h>

Description

Wrapper around glibc regex functions to provide language coding-neutral processing.

Functions

ags_regcomp ()

int
ags_regcomp (regex_t *preg,
             const char *regex,
             int cflags);

Compile regular expression language independent. It sets temporaly the locale to C and then reverts it.

Parameters

preg

pattern buffer storage area

 

regex

regular expression as string

 

cflags

flags

 

Since: 3.0.0


ags_regexec ()

int
ags_regexec (const regex_t *preg,
             const char *string,
             size_t nmatch,
             regmatch_t pmatch[],
             int eflags);

Execute regular expression language independent. It sets temporaly the locale to C and then reverts it.

Parameters

preg

pattern buffer storage area

 

string

the string to match

 

nmatch

match count

 

pmatch

match array

 

eflags

error flags

 

Since: 3.0.0