4
I have a large file with plain text (no html tags, etc.). What I want to do is to apply regex to whole file on the one hand but on the other I want to choose which changes will be applied.
For example if I have a regexp like /house/ -> home I want to see some sort of preview and decide to which occurrences it will be applied, for ex. first and third.
What I need is editor which displays not only the preview of changes (something like powergrep editor (powergrep.com))but allow me to choose which changes to apply within. Let me give you a brief example. I want to change word Alice in whole book "Alice in wonderland" expcept first occurrence on page 55. Sure I can do the replace all and then change this one word on page 55 but that's not what I want.
Yes, you can use regex replace with preview (highlighting results) but you can only do replace or replace all. You can't choose which replacement you want to do. As I said before. It's not a problem in 10 substitutions when you have to click 10 times. In 1000 substitution it matters. – piotr.gradzinski – 2013-03-03T20:45:23.573
1@dlm in last versions of Netbeans you can choose which of occurenses to substitute. I use Netbeans for development and this is one of features which make my life easier.. – Shimon Rachlenko – 2013-03-03T21:37:43.767
thank you. Can you describe how to do this? How to select the occurence you want to substitute? Using next/prev buttons? Some screenshots would be usefull. – piotr.gradzinski – 2013-03-03T21:46:33.557
I updated the answer with instructions how to do it. Hope it is of some help.. – Shimon Rachlenko – 2013-03-03T22:21:16.503