title: apache poi word to html conversion - words boundry
body: <p>I am using below code to convert word to html file </p>
  
  <pre><code>    public Map convert(String wordDocPath, String htmlPath,
          Map conversionParams)
  {
      log.info("Converting word file "+wordDocPath)
      try
      {
          String workingFolder = "C:\temp"
          File workingFolderFile = new File(workingFolder)
  
          FileInputStream fis = new FileInputStream(wordDocPath);
          XWPFDocument document = new XWPFDocument(fis);
          XHTMLOptions options = XHTMLOptions.create().URIResolver(new FileURIResolver(workingFolderFile));
          options.setExtractor(new FileImageExtractor(workingFolderFile))
          File htmlFile = new File(htmlPath);
          OutputStream out = new FileOutputStream(htmlFile)
          XHTMLConverter.getInstance().convert(document, out, options);
  
          log.info("Converted to HTML file "+htmlPath)
  
      }
      catch(Exception e)
      {
          log.error("Exception :"+e.getMessage(),e)
      }
  }
  </code></pre>
  
  <p>The code is properly generating html output. </p>
  
  <p>I need to put some parameters in the doc like <code>[[AGENT_NAME]]</code> that I will replace with regex later in code. But apache poi is not treating this pattern as single word and sometime splitting "[[", "AGENT_NAME" &amp; "]]" and inserting some  tags with styles in between. I cannot write regex and replace the parameters because of it.</p>
  
  <p>How does apache poi decides word boundry? is there a way to control it?</p>