How to add a space in front of every line in notepad

情到浓时终转凉″ 提交于 2019-12-05 19:01:15

问题


I have a list of data in notepad and want to insert a space in the beginning of each line.

Example

This is how it looks in the notepad now

Number

"123"

"123"

"124"

"126"

"147"

I want it to look like below

    Number

    "123"

    "123"

    "124"

    "126"

    "147"

I am sure there is some short cut. Please advice.


回答1:


Open your file in Notepad++

Press Ctrl+H to open the Replace window.

Change the "Search Mode" to Regular expression.

In the "Find what" box, type (\n|^)

In the "Replace with" box, type \1     (with your spaces or tab at the end)

Then click "Replace All"

Note: If you want tabs instead of spaces, a tab character can be typed with Alt+09



来源:https://stackoverflow.com/questions/27696372/how-to-add-a-space-in-front-of-every-line-in-notepad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!