文字列を取り出してその中のすべての[]を取り除きたいだけでなく、それらの中の任意のテキスト/文字を削除したいと思います。私は正規表現か別の方法を使うべきかどうか分かりません。
例:「<content>」を文字列から削除する
"Name []"` to `"Name"
"Another name [text123]"` to `"Another name"
"Yet another name [a] [] [c]"` to `"Yet another name"
"[So many names] [test] []"` to `"[So many names]"
"[TITLE] name []"` -> `"name"
"[txt2] [namez] [] a"` -> `"a"
に従うよう、あなたは何を試してみましたか?私はString :: regexpで置き換える使用します。また、これはあなたがhttps://regex101.com/#javascript – jusopi