Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Perform a regular expression match
<?php preg_match(    string $pattern,    string $subject,    array &$matches = null,    int $flags = 0,    int $offset = 0): int|false
<?php     static function insertAttributesIntoHtmlRoot($html, $attributes) {

        $attributesFormattedForHtmlElement = static::stringifyHtmlAttributes($attributes);



        preg_match('/(?:\n\s*|^\s*)<([a-zA-Z0-9\-]+)/', $html, $matches, PREG_OFFSET_CAPTURE);



        throw_unless(

            count($matches),
<?php     public function isClassNameValid($name)

    {

        return preg_match("/^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*$/", $name);

    }



    public function isReservedClassName($name)
<?php         if (preg_match('/filename\*=utf-8\'\'(.+)$/i', $header, $matches)) {

            return rawurldecode($matches[1]);

        }
<?php             return rawurldecode($matches[1]);

        }



        if (preg_match('/.*?filename="(.+?)"/', $header, $matches)) {

            return $matches[1];

        }
<?php             return $matches[1];

        }



        if (preg_match('/.*?filename=([^; ]+)/', $header, $matches)) {

            return $matches[1];

        }
<?php             if (preg_match($openingDirectivesPattern, $match[0])) {

                $template = static::prefixOpeningDirective($match[0], $template);

            } elseif (preg_match($closingDirectivesPattern, $match[0])) {

                $template = static::suffixClosingDirective($match[0], $template);
<?php             if (preg_match($openingDirectivesPattern, $match[0])) {

                $template = static::prefixOpeningDirective($match[0], $template);

            } elseif (preg_match($closingDirectivesPattern, $match[0])) {

                $template = static::suffixClosingDirective($match[0], $template);

            }

        }
<?php                 if ($parent) {

                    if (config('app.debug')) trigger('profile', 'child:'.$component->getId(), $parent->getId(), [$start, microtime(true)]);



                    preg_match('/<([a-zA-Z0-9\-]*)/', $html, $matches, PREG_OFFSET_CAPTURE);

                    $tag = $matches[1][0];

                    static::setParentChild($parent, $key, $tag, $component->getId());

                }