Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Regex.php

function Regex::matchStrictGroups

Variant of `match()` which returns non-null matches (or throws)

Parameters

non-empty-string $pattern:

int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported:

Throws

UnexpectedNullMatchException

File

vendor/composer/pcre/src/Regex.php, line 44

Class

Regex

Namespace

Composer\Pcre

Code

public static function matchStrictGroups(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchStrictGroupsResult {
    // @phpstan-ignore composerPcre.maybeUnsafeStrictGroups
    $count = Preg::matchStrictGroups($pattern, $subject, $matches, $flags, $offset);
    return new MatchStrictGroupsResult($count, $matches);
}
RSS feed
Powered by Drupal