Hi team
I am trying to delete a line of text in docx using Aspose words java.
The input and output using aspose is like this.
Input
Line 1
Line 2
Line 3
Line 4
Output
Line 1
Line 4
I don’t want those line breaks. How can I achieve this?
FindReplaceOptions findReplaceOptions = new FindReplaceOptions();
findReplaceOptions.setDirection(FindReplaceDirection.FORWARD);
findReplaceOptions.setFindWholeWordsOnly(true);
findReplaceOptions.setMatchCase(true);
document.getRange().replace(text, "", findReplaceOptions);