Skip to content

Instantly share code, notes, and snippets.

@veb
Created June 29, 2014 03:40
Show Gist options
  • Save veb/d34a2a9b520d701c5683 to your computer and use it in GitHub Desktop.
Save veb/d34a2a9b520d701c5683 to your computer and use it in GitHub Desktop.
public void doPost() {
Pattern tagMatcher = Pattern.compile("[#]+[A-Za-z0-9-_]+\\b");
Matcher m = tagMatcher.matcher(sourcetext);
List<String> tokens = new ArrayList<String>();
while(m.find()) {
String token = m.group();
tokens.add(token);
}
JournalEntry journalEntry = new JournalEntry();
journalEntry.setMood(statusPager.getCurrentItem());
journalEntry.setContent(statusText.getText().toString());
journalEntry.setIntensity(statusSeekBar.getProgress());
journalEntry.setArchived(false);
journalEntry.save();
finish();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment