Hi,
I try to create a macro for generating nested section identifiers like:
Input:
id="sec1_@"
id="sec1_@_@"
id="sec1_@_@"
id="sec1_@_@_@"
id="sec1_@_@_@"
id="sec1_@_@"
id="sec1_@"
id="sec1_@"
id="sec1_@_@"
id="sec1_@_@_@"
id="sec1_@_@_@"
id="sec1_@_@_@"
id="sec1_@_@"
id="sec1_@"
id="sec1_@"
id="sec1_@"
Expected output:
id="sec1_1"
id="sec1_1_1"
id="sec1_1_2"
id="sec1_1_2_1"
id="sec1_1_2_2"
id="sec1_1_3"
id="sec1_2"
id="sec1_3"
id="sec1_3_1"
id="sec1_3_1_1"
id="sec1_3_1_2"
id="sec1_3_1_3"
id="sec1_3_2"
id="sec1_4"
id="sec1_5"
id="sec1_6"
But after playing macro the output is:
id="sec1_1"
id="sec1_1_1"
id="sec1_1_2"
id="sec1_1_2_1"
id="sec1_1_2_2"
id="sec1_1_3"
id="sec1_2"
id="sec1_3"
id="sec1_3_4"
id="sec1_3_4_3"
id="sec1_3_4_4"
id="sec1_3_4_5"
id="sec1_3_5"
id="sec1_4"
id="sec1_5"
id="sec1_6"
I can not solve this problem. Please help any one.
Initial attached macro file deleted. See my next post for the extended macro file.
I try to create a macro for generating nested section identifiers like:
Input:
id="sec1_@"
id="sec1_@_@"
id="sec1_@_@"
id="sec1_@_@_@"
id="sec1_@_@_@"
id="sec1_@_@"
id="sec1_@"
id="sec1_@"
id="sec1_@_@"
id="sec1_@_@_@"
id="sec1_@_@_@"
id="sec1_@_@_@"
id="sec1_@_@"
id="sec1_@"
id="sec1_@"
id="sec1_@"
Expected output:
id="sec1_1"
id="sec1_1_1"
id="sec1_1_2"
id="sec1_1_2_1"
id="sec1_1_2_2"
id="sec1_1_3"
id="sec1_2"
id="sec1_3"
id="sec1_3_1"
id="sec1_3_1_1"
id="sec1_3_1_2"
id="sec1_3_1_3"
id="sec1_3_2"
id="sec1_4"
id="sec1_5"
id="sec1_6"
But after playing macro the output is:
id="sec1_1"
id="sec1_1_1"
id="sec1_1_2"
id="sec1_1_2_1"
id="sec1_1_2_2"
id="sec1_1_3"
id="sec1_2"
id="sec1_3"
id="sec1_3_4"
id="sec1_3_4_3"
id="sec1_3_4_4"
id="sec1_3_4_5"
id="sec1_3_5"
id="sec1_4"
id="sec1_5"
id="sec1_6"
I can not solve this problem. Please help any one.
Initial attached macro file deleted. See my next post for the extended macro file.