The new editor framework provides a more interactive and rich experience when replacing text. It’s a very simple improvement, but one that I think will make you feel ‘better.’ I know that’s a subjective measurement, but I’m sticking with it.
And something I talked about earlier, double-clicking on a ‘word’ in the editor will auto-find and highlight all occurrences of that text. This is then automatically used as the basis of a search and replace exercise.
Regular Expression Validation
Thanks to Jack, I also just noticed that the search dialog auto-validates your RegEx search terms. The input text will remain ‘red’ until it’s a valid search term – this is of course after you toggle the ‘Regular Expressions’ checkbox on the search dialog.
When Will This Fancy New Image Be Available for Download?
Soon. We’ll let you know as soon as it hits the presses. You can find the current version of it for download here.
Is there any way to have the ‘Selected Text Only’ tick box to stay ticked?
currently every time I select a block of text that I would like to search and replace within, I need to recheck this box so that the changes are not made to the entire script. It is too easy to forget to do this!
That appears to be working as you would like (and me too!) in 4.1 EA2.
Thanks – I am on 22.214.171.124 so that will be the problem.
Can you say something about how to use the find and replace with regex and backreference?
Tried \n and $n but none of these working..
Same as https://community.oracle.com/thread/2620028
See my conversation with Alejandro Rodriguez above…we bugged it, and the JDev team fixed it in v4.1 – which isn’t available yet.
In v4.1 you’ll use $ notation to reference back references for replace strings.
Back reference notation for replace strings ($1 .. $9) works for expressions in brackets, but I could not figure out how to insert a newline into the replace string. >A\nBAnBA
Yesterday I upgraded to 126.96.36.199 to find out that Regexp Replace back reference is no longer working.
For example, I was trying to remove the upper() function from a query that has 62 instances of the function, so issued the following replace:
Search for: (upper\()([^)]+)(\))
Replace with: \2
Got: “\2” instead of the column name.
This is a feature that was working in 3.2, so I’m glad I didn’t remove it from my hard drive because it came handy today.
I stumbled upon the same bug today and was very disappointed. I migrated from 3 to 4.0.316.84 only recently. Now I’m thinking about going back. Fully functional regexes are really important to me, as they keep up my productivity. Copying everything to Notepad++ to do the regex magic there isn’t really a solution…
JDeveloper broke this when we went to version 4.0 and their new framework. I contacted the developer and logged the bug so that hopefully we can have it working as expected again in version 4.1.
great – many thanks! Your help is highly appreciated.
I just tried the search & replace in 4.1 (Version 188.8.131.52 Build MAIN-17.29, to be precise), hoping that the bug with regex back references would be resolved. Instead I see that search and replace with regexes has been broken completely. No matter which regular expression I enter, I always get a dialog box to the effect that this text hasn’t been found. Migrating to 4.1 feels like a downgrade to me…
It would be great if you could ask the developers to incorporate the regex search & replace into the standard test suite to prevent disappointments there. Is there any hope of getting a fully functional regex search and replace back any time soon?
We’re aware of the search/replace issues and they’re being worked on now as a matter of fact.
One of my favorite new features in the search box is notification via red text of an invalid regex, when “Regular Expressions” is checked. It has saved me from many a modal error box so far.
I hadn’t noticed that yet – thanks for the heads-up! I just amended the post to include that bit of information as well.
Nice feature! The new editor framework really rocks! SQL Developer 4.0 is really going to be a huge step forward.
Thanks Danilo – we’re very excited to get it out to folks and show it off! And we have more toys on the way 🙂