FindReplaceOptions optionsWhile = new FindReplaceOptions();
optionsWhile.setReplacingCallback(new ReplaceHandler());
WordDoc.getRange().replace(Pattern.compile("[tag(.+?)](.+?)[/tag]"), "", optionsWhile);
in ReplaceHand…...be the only) run can contain text before the match, // in this...contains the match if there is any text left. if ((currentNode != null)...