如何在Notepad ++中的特定字符处换行? [英] How to break lines at a specific character in Notepad++?
本文介绍了如何在Notepad ++中的特定字符处换行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个文本文件,其中包含类似以下内容的文本:
I have a text file containing text like:
['22APR2012 23:10', '23APR2012 07:10', 1, 3, 0], ['22APR2012 23:10', '23APR2012 07:20', 1, 3, 0], ['22APR2012 23:15', '23APR2012 06:40', 0, 1, 0], ['22APR2012
23:15', '23APR2012 06:40', 1, 3, 0], ['22APR2012 23:15', '23APR2012 06:40', 0, 1, 0], ['22APR2012 23:15', '23APR2012 07:00', 1, 3, 0], ['22APR2012 23:15', '23APR2012
07:00', 0, 1, 0], ['22APR2012 23:20', '23APR2012 09:35', 0, 1, 0], ['22APR2012 23:20', '23APR2012 09:35', 1, 3, 0], ['22APR2012 23:20', '23APR2012 10:10', 1, 3, 0],
['22APR2012 23:25', '23APR2012 05:35', 1, 3, 0],
我希望这些行在],
个字符处中断:
I want the lines break at ],
characters:
['22APR2012 19:30', '23APR2012 00:25', 0, 1, 0],
['22APR2012 19:35', '23APR2012 01:45', 1, 3, 0],
['22APR2012 19:50', '23APR2012 05:25', 1, 3, 0],
['22APR2012 19:50', '23APR2012 05:25', 0, 1, 0],
['22APR2012 19:55', '23APR2012 06:25', 1, 3, 0],
在Notepad ++或任何其他编辑器中有没有办法做到这一点?
Is there a way to do it in Notepad++, or any other editor?
推荐答案
- 点击Ctrl + h或在顶部菜单上搜索->替换
- 在搜索模式"组下,选择正则表达式"
- 在查找内容"文本框中,键入
],\s*
- 在替换为"文本字段中,输入
],\n
- 点击全部替换
- Click Ctrl + h or Search -> Replace on the top menu
- Under the Search Mode group, select Regular expression
- In the Find what text field, type
],\s*
- In the Replace with text field, type
],\n
- Click Replace All
这篇关于如何在Notepad ++中的特定字符处换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文