Skip to content

Kirby 4.4.1

Str::matchAll()

Match string against a regular expression and return all matches

Str::matchAll(string $string, string $pattern, int $flags = 0, int $offset = 0): array|null

Parameters

Name Type Default Description
$string * string The string to match
$pattern * string The regular expression
$flags int 0 Optional flags for PHP preg_match_all()
$offset int 0 Positional offset in the string to start the search

Return type

array|null

Parent class

Kirby\Toolkit\Str