MS Word text to Notepad++ (strip formatting, and keep carriage return for paragraphs on a separate line)?

StackOverflow https://stackoverflow.com/questions/22569430

Pregunta

I have several word documents. Each one must be stripped of formatting in preparation for adding the page content to a blog.

I tried to simply "copy & paste" the content into NotePad++, but NotePad++ does not put the paragraph lines on a new line. Is there a way to automate this using the search/replace function, or other method?

Please be specific as I'm fairly new to notepad++.

¿Fue útil?

Solución

In Notepad++, use Search->Replace

Find: \r\n

Replace: \r\n\r\n

Check the Extended item in the Search Mode at the lower left.

Notepad++ Replace Dialog

The above finds all of the carriage return/line feed combinations (\r\n) and doubles them, causing a blank line to be added between paragraphs.

The Notepad++ View->Show Symbol->Show All Characters menu will allow you to see the characters before and after the replacement is done, as is displayed in the image below (after replacement was completed).

Notepad++ view with Show Symbol Show All Characters on

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top