$table =~ s!(bad condition text 1 \[toggle\])(bad condition text 2 \[toggle\])!$1$2!gs;