469,601 Members | 2,421 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,601 developers. It's quick & easy.

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.
Feb 6 '08 #1
3 25690
wrote:
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.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Feb 6 '08 #2
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.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Feb 6 '08 #3
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.
Feb 6 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Paul | last post: by
2 posts views Thread by :\\\\derian | last post: by
2 posts views Thread by scorpion53061 | last post: by
reply views Thread by vipal.keshwala | last post: by
2 posts views Thread by no.mail.pls | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.