src/main/java/com/github/fracpete/deps4j/MinDeps.java
protected String packagesRegExp() {
    StringBuilder	result;
    int			i;
    String		pkg;

    result = new StringBuilder();
    result.append(".* (");
    for (i = 0; i < m_Packages.size(); i++) {
      if (i > 0)
        result.append("|");
      pkg = m_Packages.get(i);
      if (!pkg.endsWith("."))
        pkg = pkg + ".";
      pkg = pkg.replace(".", "\\.");
      result.append(pkg);
    }
    result.append(").*$");

    return result.toString();
  }
protected String packagesRegExp() {
    StringBuilder	result;
    int			i;
    String		pkg;

    result = new StringBuilder();
    result.append(".* (");
    for (i = 0; i < m_Packages.size(); i++) {
      if (i > 0)
        result.append("|");
      pkg = m_Packages.get(i);
      if (!pkg.endsWith("."))
        pkg = pkg + ".";
      pkg = pkg.replace(".", "\\.");
      result.append(pkg);
    }
    result.append(").*$");

    return result.toString();
  }
Builds the regular expression for the packages to keep.

@return		the regexp