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.
<>の間に埋め込まれた文字列の末尾にある=改行文字を削除する方法を教えてください。\n
=
\n
たとえば、入力文字列
set string "abcd 1234 abc= "
= と改行を最後から削除したいだけです
使ってみてregsub
regsub
regsub {=\n$} $string {} string
テスト
% set string "abcd 1234 abc= " abcd 1234 abc= % regsub {=\n$} $string {} string 1 % puts $string abcd 1234 abc