TITEL ^

libpcre.imc - pcre interface

SYNOPSIS ^

  .include "library/pcre.imc"
  .PCRE_INIT(lib)
  .PCRE_COMPILE(pattern, options, regex, error, errptr)
  .PCRE_MATCH(regex, string, nres, ovector)
  .PCRE_DOLLAR(string, ok, ovector, n, match)

DESCRIPTION ^

Above macros call functions in libpcre.imc.

macro PCRE_INIT(var)

Intialize the pcre library. The PMC var is set to the library handle and additionally stored as global "pcre::lib".

macro PCRE_COMPILE((pattern, options, regex, error, errptr)

Compile the string pattern with int options. Returns var regex string error and int errptr.

macro PCRE_MATCH(regex, str, start, options, ok, res)

Match the var regex against string str from int start with int options. Returns the number of matches in int ok and the ovector in var res.

macro PCRE_DOLLAR(str, ok, res, n, matched)

Extract from string str the int nth result into string match.

FILES ^

pcre.imc, libpcre.imc

SEE ALSO ^

pcre(3)

AUTHOR ^

Leopold Toetsch


parrot