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         $base = $prefix;



        foreach ($listing as $item) {

            if ($item === '' || preg_match('#.* \.(\.)?$|^total#', $item)) {

                continue;

            }
<?php                 continue;

            }



            if (preg_match('#^.*:$#', $item)) {

                $base = preg_replace('~^\./*|:$~', '', $item);

                continue;

            }
<?php     private function detectSystemType(string $item): string

    {

        return preg_match(

            '/^[0-9]{2,4}-[0-9]{2}-[0-9]{2}/',

            $item

        ) ? self::SYSTEM_TYPE_WINDOWS : self::SYSTEM_TYPE_UNIX;

    }



    private function normalizeWindowsObject(string $item, string $base): StorageAttributes
<?php     private function rejectFunkyWhiteSpace(string $path): void

    {

        if (preg_match('#\p{C}+#u', $path)) {

            throw CorruptedPathDetected::forPath($path);

        }

    }