protected function parseFileName($fileName)
    {
        return preg_replace_callback('#(\[.*\])#U', function ($matches) {
            $format = str_replace(['[',']'], [], $matches[1]);

            return $this->now->format($format);
        }, $fileName);
    }
protected function parseFileName($fileName)
    {
        return preg_replace_callback('#(\[.*\])#U', function ($matches) {
            $format = str_replace(['[',']'], [], $matches[1]);

            return $this->now->format($format);
        }, $fileName);
    }
protected function parseFileName ( $ fileName ) { return preg_replace_callback ( '#(\[.*\])#U' , function ( $ matches ) { $ format = str_replace ( [ '[' , ']' ] , [ ] , $ matches [ 1 ] ) ; return $ this -> now -> format ( $ format ) ; } , $ fileName ) ; }
Parse file name to include date in it.

@param string $fileName

@return string
Parse file name to include date in it .