twitter/twitter-text-java — pull request #14 by keitaf (2011-12-12 19:48:53+00:00)
Title: Consolidate AUTO_LINK_USERNAMES* and EXTRACT_MENTIONS into VALID_MENTION_OR_LIST

There are almost identical but slightly different regex patterns for extracting at_mention/list and auto-linking at_mention/list. Because of the difference, at_mention/list preceded by "RT" or "RT:" is auto-linked, but not extracted as entity.

This will consolidate extractMentions* and autolinkUsername* regex patterns into a single validMentionOrList, and use it both in auto-linking and extracting at-mentions/lists. This makes the behavior of auto-linker and extractor consistent.

This also moves regex.Spaces.UNICODE_SPACES into Regex, and removes regex.Spaces.