RE Search and replace
Posted: Wed Nov 28, 2001 7:29 am
Hi--is anybody there give me little insight on how to solve rather a puzzle here;)--
Thanks in advance--Cheers--Simin
Case Expression:
-------------------------
We need to first find the string "***TOP",then in every 3rd line from that string for eg: in "[&Group Title]" we need to append an index so it will look like "[&Group Title_1]"--The indexing rule takes every 3rd line from the string "***TOP" as the main title indexing and in between we have the sub indexing--
Input Text:
--------------
***TOP1
**XXX
[&Group Title]
13_xxxxx [visual aid]_to
33_xxxxx [visual aid]_from
.01_xxxxx [visual usage]_tout
[--]
***TOP2
**YYY
21_yyyyyyy [&File]
22_yyyyyyy [visual impact]_to
1_yyyyyyy [visual impact]_from
Expected Result:
-------------------------
***TOP1
**XXX
[&Group Title_1]
13_xxxxx [visual aid_1]_to
33_xxxxx [visual aid_2]_from
.01_xxxxx [visual usage_3]_tout
[--]
***TOP2
**YYY
21_yyyyyyy [&File_2]
22_yyyyyyy [visual impact_1]_to
1_yyyyyyy [visual impact_2]_from
Thanks in advance--Cheers--Simin
Case Expression:
-------------------------
We need to first find the string "***TOP",then in every 3rd line from that string for eg: in "[&Group Title]" we need to append an index so it will look like "[&Group Title_1]"--The indexing rule takes every 3rd line from the string "***TOP" as the main title indexing and in between we have the sub indexing--
Input Text:
--------------
***TOP1
**XXX
[&Group Title]
13_xxxxx [visual aid]_to
33_xxxxx [visual aid]_from
.01_xxxxx [visual usage]_tout
[--]
***TOP2
**YYY
21_yyyyyyy [&File]
22_yyyyyyy [visual impact]_to
1_yyyyyyy [visual impact]_from
Expected Result:
-------------------------
***TOP1
**XXX
[&Group Title_1]
13_xxxxx [visual aid_1]_to
33_xxxxx [visual aid_2]_from
.01_xxxxx [visual usage_3]_tout
[--]
***TOP2
**YYY
21_yyyyyyy [&File_2]
22_yyyyyyy [visual impact_1]_to
1_yyyyyyy [visual impact_2]_from