preg_match_all

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Perform a global regular expression match
<?php preg_match_all(    string $pattern,    string $subject,    array &$matches = null,    int $flags = 0,    int $offset = 0): int|false
<?php                 return is_string($value);

            })

            ->map(function ($value) {

                preg_match_all('/"asset::([^"]+)"/', $value, $matches);



                return str_replace('\/', '/', $matches[1]) ?? null;

            })
<?php                 return is_string($value);

            })

            ->map(function ($value) {

                preg_match_all('/"asset::([^"]+)"/', $value, $matches);



                return str_replace('\/', '/', $matches[1]) ?? null;

            })
<?php         foreach ($sections as $section) {

            $heading = substr($section, 0, strpos($section, '</h2>'));



            if (preg_match_all('#%S%(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?%E%#', $section, $matches, PREG_SET_ORDER) !== 0) {


                foreach ($matches as $row) {

                    if (! isset($row[2])) {
<?php                     $i = 0;




                    $result = preg_match_all($regex['whole'], $property, $matches);

                    if ($result) {

                        $found['whole'] += $strength * $result;

                    }
<?php                         $found['whole'] += $strength * $result;

                    }



                    $result = preg_match_all($regex['partial'], $property, $matches);

                    if ($result) {

                        $found['partial_whole'] += $strength * $result;

                    }
<?php                         $found['partial_whole'] += $strength * $result;

                    }



                    $result = preg_match_all($regex['partial_from_start'], $property, $matches);

                    if ($result) {

                        $found['partial_whole_start'] += $strength * $result;

                    }
<?php                     foreach ($words as $word) {

                        $result = preg_match_all($regex['whole'], $word, $matches);

                        if ($result) {

                            $found['whole_word'] += $strength * $result;
<?php                             }

                        }



                        $result = preg_match_all($regex['partial'], $word, $matches);

                        if ($result) {

                            $found['partial_word'] += $strength * $result;
<?php                             }

                        }



                        $result = preg_match_all($regex['partial_from_start'], $word, $matches);

                        if ($result) {

                            $found['partial_word_start'] += $strength * $result;
<?php     {

        $content = $this->parse([]);



        preg_match_all('/<img[^>]*src="([^"]*)"/i', $content, $matches, PREG_SET_ORDER);



        if (empty($matches)) {

            return $content;
<?php         $strings = [];



        foreach ($this->files->allFiles($this->paths) as $file) {

            if (preg_match_all('/'.$this->methodRegex().'/imu', $file->getContents(), $matches)) {

                foreach ($matches[2] as $match) {

                    $strings[] = trim(stripcslashes($match));

                }
<?php                 }

            }



            if (preg_match_all('/'.$this->annotatedReturnRegex().'/imu', $file->getContents(), $matches)) {

                foreach ($matches[2] as $match) {

                    $strings[] = trim(stripcslashes($match));

                }
<?php     protected function preg_match_all($pattern, $subject, &$matches = [], $flags = 0, $offset = 0)

    {

        $return = preg_match_all($pattern, $subject, $matches, $flags, $offset);

        $this->handleRegexError();



        return $return;
<?php         $this->assertStringContainsString('<label>Email Address</label><input type="email" name="email" value="" required>', $output);

        $this->assertStringContainsString('<label>Message</label><textarea name="message" rows="5" required></textarea>', $output);



        preg_match_all('/<label>(.+)<\/label>/U', $output, $fieldOrder);



        $this->assertEquals(['Full Name', 'Email Address', 'Message'], $fieldOrder[1]);

    }
<?php EOT

        );



        preg_match_all('/<p class="error">(.+)<\/p>/U', $output, $errors);

        preg_match_all('/<p class="email-error">(.+)<\/p>/U', $output, $emailError);

        preg_match_all('/<p class="success">(.+)<\/p>/U', $output, $success);