function Regex::replaceCallbackStrictGroups
Variant of `replaceCallback()` which outputs non-null matches (or throws)
Parameters
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:
File
-
vendor/
composer/ pcre/ src/ Regex.php, line 144
Class
Namespace
Composer\PcreCode
public static function replaceCallbackStrictGroups($pattern, callable $replacement, $subject, int $limit = -1, int $flags = 0) : ReplaceResult {
$result = Preg::replaceCallbackStrictGroups($pattern, $replacement, $subject, $limit, $count, $flags);
return new ReplaceResult($count, $result);
}