FindReplaceOptions optionsWhile = new FindReplaceOptions();
optionsWhile.setReplacingCallback(new ReplaceHandler());
WordDoc.getRange().replace(Pattern.compile("[tag(.+?)](.+?)[/tag]"), "", optionsWhile);
in ReplaceHand…...text is spanned to several paragraphs, but the code searches the...last Run node in the current paragraph is encountered. It would be...