Hello

I have this string

$output="Jan-19-12 03:11:31 [Various_Words] 85.54.177.0 -- invalid HELO: 'PC100521998230'";

I need to remove from $output [Various_Words] to have this

$output="Jan-19-12 03:11:31 85.54.177.0 -- invalid HELO: 'PC100521998230'";

Into the brackets there could be various words not only Various_Words .

I am trying this

$pattern = '/ \[\[A-Za-z]\]/' ;
$replacement =' ';
$output = preg_replace($pattern, $replacement, $output) ;

but the pattern is not good, any help please ?

Thank you