3

VSCode巧妙使用正则替换提高效率

 3 years ago
source link: https://www.pkslow.com/archives/vscode-replace
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
技术之前,先读诗书:

空里流霜不觉飞,汀上白沙看不见。

VSCode巧妙使用正则替换提高效率

发表于 2021-05-03 | 分类于 其它 | 0 | 阅读次数 11

替换文件,选中正则模式,匹配文件为^\s*$\n,替换文件为空,点击替换即可。

通过替换加引号

有时我们需要给一列文本加上引号,特别是在代码中或数据库查询中,如将:

'111111','222222','333333','444444','555555','666666'

方法如下:

最后再在头尾加上引号即可。如果想保持列模式:

将','改为',\n'



参考:官网


欢迎关注微信公众号<南瓜慢说>,将持续为你更新...

推荐阅读:
如何制定切实可行的计划并好好执行
容器技术(Docker-Kubernetes)
SpringBoot-Cloud相关
Https专题


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK