Hi
I have the following variables
1) abc_0 abc_1 abc_2
2) def_2 def_3 def_4
3) ghi_00 ghi_1 ghi_2 ghi_3 ghi_4
I want to convert the variable names to start from 1 and go till "n" where n is the number of variables with the consistent initial variable pattern (i.e abc, def or ghi). So eventually I want the variable list to look like
1) abc_1 abc_2 abc_3
2) def_1 def_2 def_3
3) ghi_1 ghi_2 ghi_3 ghi_4 ghi_5
What would be the most efficient way to get to this. Reminder - variable names can contain different number of characters so - there could be - jklmn_1 jklmn_2 jklmn_3................jklmn_14
Thank You
I have the following variables
1) abc_0 abc_1 abc_2
2) def_2 def_3 def_4
3) ghi_00 ghi_1 ghi_2 ghi_3 ghi_4
I want to convert the variable names to start from 1 and go till "n" where n is the number of variables with the consistent initial variable pattern (i.e abc, def or ghi). So eventually I want the variable list to look like
1) abc_1 abc_2 abc_3
2) def_1 def_2 def_3
3) ghi_1 ghi_2 ghi_3 ghi_4 ghi_5
What would be the most efficient way to get to this. Reminder - variable names can contain different number of characters so - there could be - jklmn_1 jklmn_2 jklmn_3................jklmn_14
Thank You
Comment