Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Find and replace (insert Return character)

Reply
Thread Tools

Find and replace (insert Return character)

 
 
©®
Guest
Posts: n/a
 
      02-06-2008
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.


 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      02-06-2008
©® 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/
 
Reply With Quote
 
 
 
 
Joseph Kesselman
Guest
Posts: n/a
 
      02-06-2008
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
 
Reply With Quote
 
©®
Guest
Posts: n/a
 
      02-06-2008
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 3 02-14-2011 05:28 AM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 0 02-10-2011 05:18 PM
pyrex functions to replace a method (Re: replace a method in class:how?) Brian Blais Python 1 06-27-2006 12:13 PM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57