How did you overcome it?
I am having similar issues with trying to replace \n\n with \n -- the results, of course, no longer contain a single newline, but many '\n' literals have been inserted . I've tried monkeying around with escape characters and just ended up having those in the file also.
Apparently this actually was fixed for the 4.0.1 patch, but you have to tweak the Edit > Find ... (Ctrl-F) options in the code editor or worksheet if you want to activate it. It is always good to have a choice! From the base JDeveloper bug comments ...
This is now controlled by its own preference 'substitute escaped characters' and does not rely on 'regex'. The regex preference is used only for matching.
SQL Developer Team
Ok Gary, but...
in a SQLWorksheet write:
Now Edit -> Replace search for b , replace with \nb
Result (the last b is not replaced):
At this point, I want to have my string back on one line: Edit -> Replace search for \n , replace with (nothing here)
Result: The search text "\n" was not found.
And to make it work I have to tick the Regular Expressions checkbox (in this case substitute escaped characters is ignored).
While I agree that "it is good to have a choice", I personally find it confusing: none of the few text editors I use (Linux or OSX) behaves this way.
Thanks for the feedback. After I looked up the status on the bug Janet logged, I did play with the new When replacing options for a second, but got jazzed by the Scope: Prompt option and never followed through on actually changing anything! I updated that bug with your comments and requested revisiting that JDeveloper base bug.