Situation after running my initial script this is my output. Problem is there are more then one "Figure" associated with the <item><?hotspot color="blue" href=__!'#-##' >
What I need to do is copy the "<item..." information and append it to all the figures below it till it reaches the next "<item", then repeat.
I know this would be a loop, but how
Loop
Find regexp "<item><?hotspot color="blue" href=__!"
select
copy
replace ">Figure.*"
SAMPLE TEXT:
<item><?hotspot color="blue" href=__!'2-17.1A'
>Figure 2-85. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.1'
>Figure 2-86. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.3'
>Figure 2-87. test<?/hotspot></item>
>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.4'
>Figure 2-88. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18'
>Figure 2-89. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.1'
>Figure 2-90. test<?/hotspot></item>
>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.2'
>Figure 2-91. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-19'
>Figure 2-92. test<?/hotspot></item>
>Figure 2-90. test<?/hotspot></item>
OUTPUT DESIRED:
<item><?hotspot color="blue" href=__!'2-17.1A'>Figure 2-85. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.1'>Figure 2-86. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.3'>Figure 2-87. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.3'>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.4'>Figure 2-88. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18'>Figure 2-89. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.1'>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.1'>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.2'>Figure 2-91. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-19'>Figure 2-92. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-19'>Figure 2-90. test<?/hotspot></item>
What I need to do is copy the "<item..." information and append it to all the figures below it till it reaches the next "<item", then repeat.
I know this would be a loop, but how
Loop
Find regexp "<item><?hotspot color="blue" href=__!"
select
copy
replace ">Figure.*"
SAMPLE TEXT:
<item><?hotspot color="blue" href=__!'2-17.1A'
>Figure 2-85. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.1'
>Figure 2-86. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.3'
>Figure 2-87. test<?/hotspot></item>
>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.4'
>Figure 2-88. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18'
>Figure 2-89. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.1'
>Figure 2-90. test<?/hotspot></item>
>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.2'
>Figure 2-91. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-19'
>Figure 2-92. test<?/hotspot></item>
>Figure 2-90. test<?/hotspot></item>
OUTPUT DESIRED:
<item><?hotspot color="blue" href=__!'2-17.1A'>Figure 2-85. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.1'>Figure 2-86. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.3'>Figure 2-87. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.3'>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-17.4'>Figure 2-88. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18'>Figure 2-89. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.1'>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.1'>Figure 2-90. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-18.2'>Figure 2-91. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-19'>Figure 2-92. test<?/hotspot></item>
<item><?hotspot color="blue" href=__!'2-19'>Figure 2-90. test<?/hotspot></item>