Instead of using String.matches() , use Pattern.split() which splits the original string whenever it encounters a regex match. The resulting number of splits will tell us the number of emoticons present in the tweet and we can get a value between 0 and 1 of how emoticon heavy the tweet is.