code: public static String getPatternFromFile(BufferedReader reader) throws IOException {
      StringBuilder matchString = new StringBuilder();
      for (String thisLine; (thisLine = reader.readLine()) != null; ) {
        if (matchString.length() > 0 && emptyLinePattern.matcher(thisLine).matches()) {
          // A blank line after getting some real content (not just comments or nothing)
          break;
        }
        Matcher m = commentPattern.matcher(thisLine);
        if (m.matches()) {
          // delete it
          thisLine = m.replaceFirst("");
        }
        if ( ! emptyLinePattern.matcher(thisLine).matches()) {
          matchString.append(thisLine);
        }
      }
      return matchString.toString();
    }
docs: Assumes that we are at the beginning of a tsurgeon script file and gets the string for the
  tregex pattern leading the file
  @return tregex pattern string