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 »

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: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Re: replace (or delete) between?

Post 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.
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 »

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