String regex = "分享图片";然后使用string的matches方法,你要匹配的字符串str:判断是否匹配if(str.matches(regex)),如果str中包含分享图片,就另做处理。不知道是否是这个意思~