Page 1 of 1

replace (or delete) between?

Posted: Fri Oct 26, 2007 3:07 am
by dreifels
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)

:?:

Re: replace (or delete) between?

Posted: Fri Oct 26, 2007 3:20 pm
by Abacre
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.

Re: replace (or delete) between?

Posted: Fri Oct 26, 2007 4:07 pm
by dreifels
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 :(