Find and replace

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
juanpgadea
Posts: 10
Joined: Mon Jun 12, 2006 12:11 pm

Find and replace

Post by juanpgadea »

Hi, i have to replace several codes in a list with the following format

E1K2S0 L3X0B3;L3X3O9
E1K6H3 L2O5C9;L5F1O1;L5G0I5
E1K6I4 L3V7I5
E0J9A7 L2M5G1
E1K6K6 L3V9T8
E1K6L7 L5D8T1
E1K6M8 L2O7Y3


E1K6M8
E1K6L7;E1K6M8
E0J9A7
E1K6H3;E1K2S0


The list is divided in two parts. The firts one is where i have the codes to find and its replacements.
In the example i have to find E1K2S0 and replace with L3X0B3;L3X3O9
Then i have to find E1K6H3 and replace with L2O5C9;L5F1O1;L5G0I5
and so on until the final of the first part, in the example the last line i have to find is E1K6M8 and replace with L2O7Y3.
The codes to find and replace are separated by tab (\t).


The resulting file for these example is:

L3X0B3;L3X3O9 L3X0B3;L3X3O9
L2O5C9;L5F1O1;L5G0I5 L2O5C9;L5F1O1;L5G0I5
L3V7I5 L3V7I5
L2M5G1 L2M5G1
L3V9T8 L3V9T8
L5D8T1 L5D8T1
L2O7Y3 L2O7Y3


L2O7Y3
L5D8T1;L2O7Y3
L2M5G1
L2O5C9;L5F1O1;L5G0I5;L3X0B3;L3X3O9


THANKS for the help
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

There is no way to automate this in TextPad. You need a script in a suitable scripting language. Unfortunately, TextPad doesn't support scripts.
juanpgadea
Posts: 10
Joined: Mon Jun 12, 2006 12:11 pm

Post by juanpgadea »

OK Thanks any way
Post Reply