This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 112353

Summary: Allow special characters in the replace box of 'search & replace'
Product: editor Reporter: johnmuir <johnmuir>
Component: SearchAssignee: Sergey Petrov <sj-nb>
Status: RESOLVED FIXED    
Severity: blocker CC: av-nb, lordpixel, mpetras
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description johnmuir 2007-08-08 21:24:30 UTC
It's not possible to carry out replacement operations when the replaced string is any kind of special character -
specifically a newline or tab character. E.g. if you want to format an XML file 
<aaa><bbb><ccc>
to
<aaa>
<bbb>
<ccc>
you have to leave Netbeans and use a normal editor like jEdit to do it.

I believe this is a defect, not just an enhancement and ought to be corrected for version 6.0.

Further, it ought to be possible to use any special character and even any Unicode character in the replace box.
Comment 1 johnmuir 2007-09-01 13:06:34 UTC
Hallo! Is anyone there?
Comment 2 Vitezslav Stejskal 2007-09-05 17:10:26 UTC
*** Issue 84730 has been marked as a duplicate of this issue. ***
Comment 3 Vitezslav Stejskal 2007-09-05 17:10:49 UTC
*** Issue 26810 has been marked as a duplicate of this issue. ***
Comment 4 Vitezslav Stejskal 2007-09-05 17:12:09 UTC
I'm sorry, but this won't be in for nb6 unless somebody volunteers to implement it.
Comment 5 Jesse Glick 2007-09-05 21:06:03 UTC
Four duplicates and seven votes makes a P4?
Comment 6 Vitezslav Stejskal 2007-09-06 13:04:11 UTC
Well, it probably does not.
Comment 7 Jiri Prox 2007-09-13 08:53:59 UTC
*** Issue 115219 has been marked as a duplicate of this issue. ***
Comment 8 Max Sauer 2008-11-13 14:02:18 UTC
Should be fixed for 7.0.
Comment 9 Alexei Mokeev 2009-04-10 11:03:35 UTC
Reproducible with 6.7 trunk (20090408).
Workaround: Use "Replace in Projects"

1. Select a file in Project view
2. Invoke replace dialog by Ctrl+Shift+H
3. For this particular case enter ">" and ">\n" respectively, check "Regular Expression" and "Selection"
And then is results hit 'Replace'
Comment 10 Sergey Petrov 2009-04-22 15:12:43 UTC
http://hg.netbeans.org/jet-main/rev/96d192cf3ee9

fixed, now editor handle special characters the same way as project (in replacement)
Comment 11 Sergey Petrov 2009-04-22 15:13:23 UTC
status update
Comment 12 Quality Engineering 2009-04-23 08:57:20 UTC
Integrated into 'main-golden', will be available in build *200904230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/96d192cf3ee9
User: sergeyp@netbeans.org
Log: fix #112353 - handle known special chanracters befor passing to matcher (matcher corrupt '\') by default, realization is the same as in org.netbeans.modules.search.BasicSearchCriteria::getReplaceString()