Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
"("内のすべての要素を に置き換えるにはどうすればよいですか" "。
"("
" "
例:
this is (test) => this is
これを試しましたか?
{$var|replace:'value':'new_value'}
この記事をフォローしました
または正規表現 str_replace?
{$var|regex_replace:"/[\r\t\n]/":" "}
ここで見つかりました
Ron van der Heijden の回答は非常に役に立ちました。同じことをする必要がありましたが、角括弧を使用して、私の解決策を以下に示します。オンラインの正規表現ジェネレーターを使用して、正規表現の部分を支援しました。
{$var|regex_replace:"(\\[.*?\\])":""}