<?php

namespace App\Service\Utils;

class ExtractOgLiveFilenameDateService
{
    public function __invoke(string $filename): ?string
    {
        if (preg_match('/_(\d{8})$/', $filename, $matches)) {
            return $matches[1];
        }

        return null;
    }
}