### Question:
RegexParser implements OrgParser { public static Pattern getCommentPrefix() { return Pattern.compile("^\\s*#.*\\s*$"); } RegexParser(final String... todoKeys); static Pattern getHeaderPattern(final String... todoKeys); static Pattern getHeaderRestPattern(); static Pattern getTimestampPattern(); static Pattern getTimestampRangePattern(); static Pattern getCommentPrefix(); static String[] parseTags(final String tagString); @Override boolean isHeaderLine(String line); @Override OrgNode createFromHeader(String line); @Override boolean isCommentLine(String line); @Override boolean isTimestampLine(String line); @Override boolean isTimestampRangeLine(String line); @Override OrgTimestamp getTimestamp(String line); @Override OrgTimestampRange getTimestampRange(String line); static final int HEADER_STARS_GROUP; static final int HEADER_TODO_GROUP; static final int HEADER_REST_GROUP; static final int HEADER_REST_TAGS_GROUP; static final int HEADER_REST_TITLE_GROUP; static final int TIMESTAMP_TYPE_GROUP; static final int TIMESTAMP_ACTIVE_GROUP; static final int TIMESTAMP_DATE_GROUP; static final int TIMESTAMP_DAY_GROUP; static final int TIMESTAMP_TIME_GROUP; static final int TIMESTAMP_TIMEEND_GROUP; static final int TIMESTAMP_REPEAT_GROUP; static final int TIMESTAMP_WARNING_GROUP; static final int TIMESTAMPRANGE_STARTDATE_GROUP; static final int TIMESTAMPRANGE_STARTDAY_GROUP; static final int TIMESTAMPRANGE_STARTTIME_GROUP; static final int TIMESTAMPRANGE_ENDDATE_GROUP; static final int TIMESTAMPRANGE_ENDDAY_GROUP; static final int TIMESTAMPRANGE_ENDTIME_GROUP; }### Answer:
@Test public void testCommentPrefix() throws Exception { String commentline = "# NONSENSEID= 24SFS2"; Matcher mc = RegexParser.getCommentPrefix().matcher(commentline); assertTrue(mc.matches()); commentline = " # NONSENSEID= 24SFS2 "; mc = RegexParser.getCommentPrefix().matcher(commentline); assertTrue(mc.matches()); commentline = "# NONSENSEID= 24SFS2 \n"; mc = RegexParser.getCommentPrefix().matcher(commentline); assertTrue(mc.matches()); }