Supported Versions: PHP 5 >= 5.3.0, PHP 7, PHP 8
Perform a regular expression search and replace
preg_filter(    string|array $pattern,    string|array $replacement,    string|array $subject,    int $limit = -1,    int &$count null): string|array|null
    {

        return 
array_merge(

            [
'<comment>Publish files from all providers and tags listed below</comment>'],

            
preg_filter('/^/''<fg=gray>Provider:</> 'Arr::sort(ServiceProvider::publishableProviders())),

            
preg_filter('/^/''<fg=gray>Tag:</> 'Arr::sort(ServiceProvider::publishableGroups()))

        );

    }
        return array_merge(

            [
'<comment>Publish files from all providers and tags listed below</comment>'],

            
preg_filter('/^/''<fg=gray>Provider:</> 'Arr::sort(ServiceProvider::publishableProviders())),

            
preg_filter('/^/''<fg=gray>Tag:</> 'Arr::sort(ServiceProvider::publishableGroups()))

        );

    }