公告
财富商城
积分规则
提问
发文
2019-03-29 13:00发布
我想做一个坏孩纸
Need to extract out hashtag Strings from a source String in Java. Any ideas / examples?
Thanks, Sri
Here is what I'm using (it handles UTF-8 tags as well, not only ASCII):
private static final Pattern TAG_PATTERN = Pattern.compile("(?:^|\\s|[\\p{Punct}&&[^/]])(#[\\p{L}0-9-_]+)");
Btw, you should be able to get the hashtags from the tweet entities (include_entities=true)
include_entities=true
最多设置5个标签!
Here is what I'm using (it handles UTF-8 tags as well, not only ASCII):
Btw, you should be able to get the hashtags from the tweet entities (
include_entities=true
)