Search and Replace

Lincoln A Baxter lab at lincolnbaxter.com
Mon Jan 4 19:56:19 EST 2016


On Mon, 2016-01-04 at 12:53 +0800, Plutocrat wrote:
> nevyoung wrote on Monday, 04 January, 2016 11:51 AM:
> > I do not S&R only the description. For example, I search for whole
> line
> > <trn:description>X Bank Fee</trn:description> and replace it with
> > <trn:description>X Bank</trn:description>.
> > 
> > The *.gnucash file is nearly 10 Meg in size. The editor I use is
> Notepad++
> > and I am using a 64 bit Win8.1 computer. I just checked that Win
> Notepad
> > running in a XP virtual machine is able to edit this file .
> 
> A couple of thoughts on Search and Replace. I used to love notepad++
> when I worked on Windows (and BBEdit on Mac). I now use Jedit, which
> has a similar feature set. Specifically in this case the ability to
> do Regular Expression Search and Replace. It works on all platforms. 
> http://sourceforge.net/projects/jedit/
> 
> If you find yourself doing this sort of thing a lot, then writing a
> script using the command line text editor 'sed' might be a worthwhile
> exercise. Just put a bunch of S&R terms into a script/batch file and
> use the -i option to edit the file "in place". eg:
> 
> sed -i 's/<trn\:description>X Bank
> Fee<\/trn\:description>/<trn\:description>X
> Bank<\/trn\:description>/g' filename.xml

Ouch... this is dangerous.  It depends on the Format of the XML, among
other things.  However, see my next email. (responding to two messages
back)...

> P
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



More information about the gnucash-user mailing list