Can Replacement string include newline?

Using IDEA's Replace Text functionality, can the replacement string have
a newline-- and how is that done? Using the java.util.regex package, I
can do it easily enough with "\n" embedded in the replacement string.
I've tried that \n and several variations yet haven't managed a newline.

Thanks,
Jon

2 comments
Comment actions Permalink

I don't know of any way to do it, either, but sure would like to know how.
I'm a big help, huh? :-D

On a related note, there's an open SCR for matching newlines:

http://www.intellij.net/tracker/idea/viewSCR?publicId=576

And (a bit less related) another for multiline search and replace text
boxes:

http://www.intellij.net/tracker/idea/viewSCR?publicId=2959

Hoping find and replace gets some attention in Aurora (so i don't have to
keep firing up TextPad to do regex junk),

chris
-


P.S. And here's my shameless plug for SCRs 2958, 2960, and 2961! :D

"Jon Steelman" <steelman@mindspring.com> wrote in message
news:asmjm4$l57$1@is.intellij.net...

Using IDEA's Replace Text functionality, can the replacement string have
a newline-- and how is that done? Using the java.util.regex package, I
can do it easily enough with "\n" embedded in the replacement string.
I've tried that \n and several variations yet haven't managed a newline.

>

Thanks,
Jon

>


0
Comment actions Permalink

Chris Bartley wrote:

I don't know of any way to do it, either, but sure would like to know how.
I'm a big help, huh? :-D


Big help you are! ]]>
I appreciate the tracker research. There are so many issue now that some
sort of categorization is getting more urgent. I believe there is a
feature request on ITN for it.

On a related note, there's an open SCR for matching newlines:

http://www.intellij.net/tracker/idea/viewSCR?publicId=576


Found a way to do this and posted on the issue.

And (a bit less related) another for multiline search and replace text
boxes:

http://www.intellij.net/tracker/idea/viewSCR?publicId=2959


I posted a new request for controlling newline matches that is
complementary to your request:
http://www.intellij.net/tracker/idea/viewSCR?publicId=8074

Hoping find and replace gets some attention in Aurora (so i don't have to
keep firing up TextPad to do regex junk),


No kidding. I think IDEA needs to switch to java.util.regex and to
improve the expressiveness both on the Find string and the Replace With
string. See new request:
http://www.intellij.net/tracker/idea/viewSCR?publicId=8075

Jon

0

Please sign in to leave a comment.