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.
次のような文字列があります。
"productName=\"NAME\"\n"
これを次のように変更します。
"productName=NAME"
Erlangでこれを行う最良の方法は何ですか?
おそらく多くの方法の1つ:
A = "productName=\"NAME\"\n". re:replace(A, ["[\"\n]*"], "", [global, {return, list}]).
(別の)おそらく多くの方法の1つ:
S0 = "productName=\"NAME\"\n". [Char || Char <- S0, not lists:member(Char, [$\", $\n])].