Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
|
Static Public Member Functions | |
static | isMatch (string $pattern, string $subject, int $offset=0) |
static | match (string $pattern, string $subject, int $flags=0, int $offset=0) |
static | matchAll (string $pattern, string $subject, int $flags=0, int $offset=0) |
static | matchAllStrictGroups (string $pattern, string $subject, int $flags=0, int $offset=0) |
Variant of matchAll() which returns non-null matches (or throws) | |
static | matchAllWithOffsets (string $pattern, string $subject, int $flags=0, int $offset=0) |
Runs preg_match_all with PREG_OFFSET_CAPTURE. | |
static | matchStrictGroups (string $pattern, string $subject, int $flags=0, int $offset=0) |
Variant of match() which returns non-null matches (or throws) | |
static | matchWithOffsets (string $pattern, string $subject, int $flags=0, int $offset=0) |
Runs preg_match with PREG_OFFSET_CAPTURE. | |
static | replace ($pattern, $replacement, $subject, int $limit=-1) |
static | replaceCallback ($pattern, callable $replacement, $subject, int $limit=-1, int $flags=0) |
static | replaceCallbackArray (array $pattern, $subject, int $limit=-1, int $flags=0) |
static | replaceCallbackStrictGroups ($pattern, callable $replacement, $subject, int $limit=-1, int $flags=0) |
Variant of replaceCallback() which outputs non-null matches (or throws) | |
|
static |
non-empty-string | $pattern | |
int-mask<PREG_UNMATCHED_AS_NULL> | $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported |
|
static |
non-empty-string | $pattern | |
int-mask<PREG_UNMATCHED_AS_NULL> | $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported |
|
static |
Variant of matchAll()
which returns non-null matches (or throws)
non-empty-string | $pattern | |
int-mask<PREG_UNMATCHED_AS_NULL> | $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported |
UnexpectedNullMatchException |
|
static |
Runs preg_match_all with PREG_OFFSET_CAPTURE.
non-empty-string | $pattern | |
int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> | $flags PREG_UNMATCHED_AS_NULL and PREG_MATCH_OFFSET are always set, no other flags are supported |
|
static |
Variant of match()
which returns non-null matches (or throws)
non-empty-string | $pattern | |
int-mask<PREG_UNMATCHED_AS_NULL> | $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported |
UnexpectedNullMatchException |
|
static |
Runs preg_match with PREG_OFFSET_CAPTURE.
non-empty-string | $pattern | |
int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> | $flags PREG_UNMATCHED_AS_NULL and PREG_MATCH_OFFSET are always set, no other flags are supported |
|
static |
string | string[] | $pattern | |
string | string[] | $replacement | |
string | $subject |
|
static |
string | string[] | $pattern | |
($flags | is PREG_OFFSET_CAPTURE ? (callable(array<int|string, array{string|null, int<-1, max>}>): string) : callable(array<int|string, string|null>): string) $replacement | |
string | $subject | |
int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> | $flags PREG_OFFSET_CAPTURE is supported, PREG_UNMATCHED_AS_NULL is always set |
|
static |
($flags | is PREG_OFFSET_CAPTURE ? (array<string, callable(array<int|string, array{string|null, int<-1, max>}>): string>) : array<string, callable(array<int|string, string|null>): string>) $pattern | |
string | $subject | |
int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> | $flags PREG_OFFSET_CAPTURE is supported, PREG_UNMATCHED_AS_NULL is always set |
|
static |
Variant of replaceCallback()
which outputs non-null matches (or throws)
string | $pattern | |
($flags | is PREG_OFFSET_CAPTURE ? (callable(array<int|string, array{string, int<0, max>}>): string) : callable(array<int|string, string>): string) $replacement | |
string | $subject | |
int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> | $flags PREG_OFFSET_CAPTURE is supported, PREG_UNMATCHED_AS_NULL is always set |