Here is what I use (it also processes UTF-8 tags, not just ASCII):
private static final Pattern TAG_PATTERN = Pattern.compile("(?:^|\\s|[\\p{Punct}&&[^/]])(#[\\p{L}0-9-_]+)");
Btw, you should be able to get hashtags from tweets ( include_entities=true )
Bozho
source share