PCRE - Perl-compatible regular expressions


#include <pcre.h>

int pcre_get_substring_list(const char *subject,
int *
ovector, int stringcount, const char ***listptr);

int pcre16_get_substring_list(PCRE_SPTR16 subject,
int *
ovector, int stringcount, PCRE_SPTR16 **listptr);

int pcre32_get_substring_list(PCRE_SPTR32 subject,
int *
ovector, int stringcount, PCRE_SPTR32 **listptr);


This is a convenience function for extracting a list of all the captured substrings. The arguments are:

subject Subject that has been successfully matched
Offset vector that pcre[16|32]_exec used
Value returned by pcre[16|32]_exec
Where to put a pointer to the list

The memory in which the substrings and the list are placed is obtained by calling pcre[16|32]_malloc(). The convenience function pcre[16|32]_free_substring_list() can be used to free it when it is no longer needed. A pointer to a list of pointers is put in the variable whose address is in listptr. The list is terminated by a NULL pointer. The yield of the function is zero on success or PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained.

There is a complete description of the PCRE native API in the pcreapi page and a description of the POSIX API in the pcreposix page.

More Linux Commands

mvgetstr(3ncurses) - accept character strings from curses te
The function getstr is equivalent to a series of calls to getch, until a newline or carriage return is received (the terminating character is not included in th

spottopgm(1) - convert SPOT satellite images to a PGM image
This program is part of Netpbm(1) spottopgm converts the named inputfile to PGM format, defaulting to the first color and the whole SPOT image unless you specif

lber-types(3) - OpenLDAP LBER types and allocation functions
The following are the basic types and structures defined for use with the Lightweight BER library. ber_int_t is a signed integer of at least 32 bits. It is comm

ls(1) - list directory contents (Commands - Linux man page)
ls.1 - List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified. Mandatory

pam_warn(8) - PAM module which logs all PAM items if called
pam_warn is a PAM module that logs the service, terminal, user, remote user and remote host to syslog(3). The items are not probed for, but instead obtained fro

gnutls_anon_set_server_dh_params(3) - API function (ManPage)
This function will set the Diffie-Hellman parameters for an anonymous server to use. These parameters will be used in Anonymous Diffie-Hellman cipher suites. RE

Xserver(1) - X Window System display server - Linux man page
X is the generic name for the X Window System display server. It is frequently a link or a copy of the appropriate server binary for driving the most frequently

DBI::Const::GetInfoType(3pm) - Data describing GetInfo type
Imports a %GetInfoType hash which maps names for GetInfo Type Codes into their corresponding numeric values. For example: $database_version = $dbh-&gt;get_info( $G

CPANPLUS::Internals::Fetch(3pm) - (unknown subject).........
CPANPLUS::Internals::Fetch fetches files from either ftp, http, file or rsync mirrors. This is the rough flow: $cb-&gt;_fetch Delegate to File::Fetch; METHODS $pat

XSetTransientForHint(3) - set or read a window's WM_TRANSIEN
The XSetTransientForHint function sets the WM_TRANSIENT_FOR property of the specified window to the specified prop_window. XSetTransientForHint can generate Bad

auparse_timestamp_compare(3) - compares timestamp values....
auparse_timestamp_compare compares the values of 2 timestamps. RETURN VALUE Returns -1, 0, or 1 respectively depending on whether e2 is less than, equal to, or

mknod(1) - make block or character special files (Man Page)
Create the special file NAME of the given TYPE. Mandatory arguments to long options are mandatory for short options too. -m, --mode=MODE set file permission bit

We can't live, work or learn in freedom unless the software we use is free.