One - One Code All

Blog Content

Visual Studio Code正则表达式批量去除第一个逗号前的内容(含逗号)以及去除最后一个逗号后面的内容

Python Linux-Mac   2021-02-19 11:50:38

Visual Studio Code正则表达式批量去除第一个逗号前的内容(含逗号)以及去除最后一个逗号后面的内容。


去除第一个逗号前的内容

包含第一个逗号

^[^,]*(?=,),

不包含第一个逗号

^[^,]*(?=,)

去除最后一个逗号前的内容

不包含最后一个逗号

[^,]*$

包含最后一个逗号

,[^,]*$



上一篇:mac安装ta-lib
下一篇:完全删除 Mac 中的 GarageBand软件

The minute you think of giving up, think of the reason why you held on so long.