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

Breadcrumb

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

function Regex::matchAllWithOffsets

Runs preg_match_all 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 103

Class

Regex

Namespace

Composer\Pcre

Code

public static function matchAllWithOffsets(string $pattern, string $subject, int $flags = 0, int $offset = 0) : MatchAllWithOffsetsResult {
    self::checkSetOrder($flags);
    $count = Preg::matchAllWithOffsets($pattern, $subject, $matches, $flags, $offset);
    return new MatchAllWithOffsetsResult($count, $matches);
}
RSS feed
Powered by Drupal