function Regex::matchWithOffsets
Runs preg_match with PREG_OFFSET_CAPTURE
Parameters
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:
File
-
vendor/
composer/ pcre/ src/ Regex.php, line 58
Class
Namespace
Composer\PcreCode
public static function matchWithOffsets(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchWithOffsetsResult {
$count = Preg::matchWithOffsets($pattern, $subject, $matches, $flags, $offset);
return new MatchWithOffsetsResult($count, $matches);
}