code: public static String escapeFilesPattern(String filesPattern)
    {
      if(filesPattern == null) {
        return null;
      }
      return filesPattern.replace(".", DOT_REX).replace("*", ANY_REX);
    }
docs: Escape files pattern for usage with Java regular expressions. Replace dot with escaped dot and asterisk with match
  at least one character so that <code>*.html</code> becomes <code>.+\.html</code>. Return null if files pattern
  argument is null and empty if empty.
  
  @param filesPattern files pattern to prepare.
  @return files pattern ready to use by regular expression.