I need some help for a regex in a #sed command for #linux, it looks like this:
sed 's^\[.*\]^^g'

I need it to only match and remove a date in this format: [20-Nov-2022 19:47:50 UTC]

I want to use a this command sed 's^\[.*\]^^g' /var/log/php/php.log | sort | uniq -c to go through my PHP log, but I think it breaks some of the lines that contain another square bracket part.

Like this one: [20-Nov-2022 19:47:50 UTC] PHP Deprecated: Return type of LanguageDetection\LanguageResult::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vendor/patrickschur/language-detection/src/LanguageDetection/LanguageResult.php on line 37

12