@Test public void testTagExtractionFrom() { List<String> tags = TagHelper.readTagFromBody( "I'm #Fabio. How are you? #nice" ); assertEquals( 2, tags.size() ); assertEquals( "#Fabio", tags.get( 0 ) ); assertEquals( "#nice", tags.get( 1 ) ); }
public static List<String> readTagFromBody(String body) { final List<String> tagValues = new ArrayList<String>(); final Matcher matcher = TAG_PATTERN.matcher(body); while (matcher.find()) { tagValues.add(matcher.group(1)); } return tagValues; }
TagHelper { public static List<String> readTagFromBody(String body) { final List<String> tagValues = new ArrayList<String>(); final Matcher matcher = TAG_PATTERN.matcher(body); while (matcher.find()) { tagValues.add(matcher.group(1)); } return tagValues; } }
TagHelper { public static List<String> readTagFromBody(String body) { final List<String> tagValues = new ArrayList<String>(); final Matcher matcher = TAG_PATTERN.matcher(body); while (matcher.find()) { tagValues.add(matcher.group(1)); } return tagValues; }  }
TagHelper { public static List<String> readTagFromBody(String body) { final List<String> tagValues = new ArrayList<String>(); final Matcher matcher = TAG_PATTERN.matcher(body); while (matcher.find()) { tagValues.add(matcher.group(1)); } return tagValues; }  static List<String> readTagFromBody(String body); }
TagHelper { public static List<String> readTagFromBody(String body) { final List<String> tagValues = new ArrayList<String>(); final Matcher matcher = TAG_PATTERN.matcher(body); while (matcher.find()) { tagValues.add(matcher.group(1)); } return tagValues; }  static List<String> readTagFromBody(String body);  }