### Question:
LrcUtil { public static String getArtist(String lrcString) { String pattern = "\\[ar:(.*)\\]"; Pattern r = Pattern.compile(pattern); Matcher m = r.matcher(lrcString); if (m.find()) { return m.group(1); } else { return null; } }  static String getArtist(String lrcString); static String getTitle(String lrcString); static String getAlbum(String lrcString); static String getEditor(String lrcString); static String getOffset(String lrcString);  }### Answer:
@Test public void getArtist() { assertEquals("中文", LrcUtil.getArtist("[ar:中文]")); assertEquals("1125", LrcUtil.getArtist("[ar:1125]")); assertEquals("[1125]", LrcUtil.getArtist("[ar:[1125]]")); assertEquals(null, LrcUtil.getArtist("[ar1235]")); }