replace (or delete) between?

General discussions about Advanced Find and Replace
Post Reply
dreifels
Posts: 2
Joined: Fri Oct 26, 2007 2:59 am

replace (or delete) between?

Post by dreifels » Fri Oct 26, 2007 3:07 am

just downloaded it for test, don't find solution yet:

have lot of files, with text string like

aaaaaxyxybbbbb (total 20 lines each file)

the part xyxy is changing in any file, but all files have same aaaa and bbbb before resp. after the changing part

I want to delete or replace the changing part between the aaaa and the bbbb so that I get in all files same aaaaaaaabbbbbbb (and then I can delete the string aaaaaaaabbbbbbb easy in all files)

:?:

Abacre
Site Admin
Posts: 1201
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Re: replace (or delete) between?

Post by Abacre » Fri Oct 26, 2007 3:20 pm

There are several possible ways to solve your task.

1st way (the simplest):

Go to Replace tab and select Insert Between action.
Put aaaaa into Text to Find field
and bbbbb into Ending With field.
Replace/Insert by Text field should be empty.

2nd way is to use regular expressions:

Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
aaaaa.*bbbbb

Replace with:
should be empty.

This expression will delete the line aaaaaxyxybbbbb assuming that xyxy is a random text.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

dreifels
Posts: 2
Joined: Fri Oct 26, 2007 2:59 am

Re: replace (or delete) between?

Post by dreifels » Fri Oct 26, 2007 4:07 pm

thanks, if this works for my 300 files with same problem you get a new customer

edit:
you got me 8)

edit:
you got me not, your payment system doesn't want me :(

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest