pcre

Regular Expression Functions (Perl-Compatible)

PHP version: 5

Required modules: none

Required packages: none

This module is part of the PHP core since PHP 5.3.0. See: http://www.php.net/manual/en/ref.pcre.php


PREG_PATTERN_ORDER = 1

PREG_SET_ORDER = 2

PREG_OFFSET_CAPTURE = 256

PREG_SPLIT_NO_EMPTY = 1

PREG_SPLIT_DELIM_CAPTURE = 2

PREG_SPLIT_OFFSET_CAPTURE = 4

PREG_GREP_INVERT = 1

PREG_NO_ERROR = 1

PREG_INTERNAL_ERROR = 1

PREG_BACKTRACK_LIMIT_ERROR = 1

PREG_RECURSION_LIMIT_ERROR = 1

PREG_BAD_UTF8_ERROR = 1

PREG_BAD_UTF8_OFFSET_ERROR = 1

PCRE_VERSION = 1

int preg_match(
        string $pattern,
        string $subject,
        return string[int] & $matches = NULL,
        int $offset = 0)


int preg_match_all(
        string $pattern,
        string $subject,
        return string[int][int] & $matches = NULL,
        int $flags = 1,
        int $offset = 0)

BUG: if the PREG_OFFSET_CAPTURE flag is used then the resulting structure of the $matches array is array[int][int][int]mixed where the elements mixed are strings and integers. PHPLint cannot support such a variability of types, so this prototype only accounts for the most common case in which the PREG_OFFSET_CAPTURE isn't used.

Remember that the possible flags combinations are:

PREG_PATTERN_ORDER (the default if no flags at all)
PREG_PATTERN_ORDER|PREG_OFFSET_CAPTURE
PREG_SET_ORDER
PREG_SET_ORDER|PREG_OFFSET_CAPTURE


string preg_replace(
        mixed $regex,
        mixed $replace,
        mixed $subject, ...)

string preg_replace_callback(
        mixed $regex,
        mixed $string_,
        mixed $subject, ...)

mixed[] preg_split(
        string $pattern,
        string $subject, ...)

string preg_quote(
        string $str,
        string $delim_char)

mixed[] preg_grep(
        string $regex,
        mixed[] $input)

int preg_last_error()


Generated by PHPLint Documentator