Find and replace (insert Return character)

©

©®

I have a whole lot of entries listed as:
<image><filename>
and would like to search and replace so the end result is so:
<image>
<filename>
i.e. there is a return/enter after <image>

I am using Notepad++). I highlighted text on two lines and when I tried
Search and Replace (Ctrl+H), I get the "square" which represents
Return/Enter in the search box but I cannot copy it to the replace box.
Anyone know how I can "type" the return character in a text editor?
Thanks.
 
M

Martin Honnen

©® said:
I have a whole lot of entries listed as:
<image><filename>
and would like to search and replace so the end result is so:
<image>
<filename>
i.e. there is a return/enter after <image>

I am using Notepad++). I highlighted text on two lines and when I tried
Search and Replace (Ctrl+H), I get the "square" which represents
Return/Enter in the search box but I cannot copy it to the replace box.
Anyone know how I can "type" the return character in a text editor?

With jEdit there is a regular expression option in the search/replace
dialog and then \n inserts a line break. Check whether Notepad++ allows
that too.
 
J

Joseph Kesselman

If you're using a text-based tool to edit the XML, the fact that it's
XML is sorta irrelevant; that's a question of what your particular tool
can do.
 
©

©®

I got an answer in the Notepad++ forum:

In the replace area, type

\1\r\n\2 -- \1 is the first group, \r\n is a carriage return and a new
line, \2 is the second group.

Click Replace All.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top