I have a document which has a auto numbered list:
1. text here
2. text here
and I'd like the script to remove the text(and all the numbers except the #1 (the first item in the numbered list should remain):
So after the script, the document should show only the blank numbered list with no entries after the numbers:
1.
2.
I cannot search for a "1. " since it is a automatically numbered list. All I want to be able to do is to remove the contents of the list but leave the numbers as a numbered list.
I tried
var regExp2 = "[[:space:]]"
docBody.replaceText("\n"+regExp2,"\n");
but get nothing.
I think I got this to work:
This successfully removes all but the first items in the list and clears first the entry in the list.