Abd*_*bdi 1 search replace tcl
我在html文件中有多行包含:
xxxxxx"./FSsacdss12s.tcl.html#::FSxxxxt_15" target="main">::FSxxxxxt</a></dt>
xxxxxx"./FSsacdss12s.tcl.html#::FSxxxxt_15" target="main">::FSxxxxxt</a></dt>
xxxxxx"./FSsacdss12s.tcl.html#::FSxxxxt_15" target="main">::FSxxxxxt</a></dt>
Run Code Online (Sandbox Code Playgroud)
我想从每一行搜索并删除所有出现的FS,结果是:
xxxxxx"./sacdss12s.tcl.html#::xxxxt_15" target="main">::xxxxxt</a></dt>
Run Code Online (Sandbox Code Playgroud)
我试过了:
set ToLft_ "^|\./|\[^a-zA-Z]|\::"
set ToRght_ "\[^a-zA-Z]|$"
regsub -all ($ToLft_)FS($ToRght_) $line "" line
Run Code Online (Sandbox Code Playgroud)
没有任何成功..非常感谢任何建议!
问候,
最简单的方法是使用string map空字符串替换所有出现的"FS":
set line [string map {FS ""} $line]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1085 次 |
| 最近记录: |