twitter/twitter-text-rb — pull request #26 by keitaf (2011-12-12 19:43:35+00:00)
Title: Consolidate extract_mentions* and autolink_username* regex patterns into valid_mention*

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 extract_mentions* and autolink_username* regex patterns into a single valid_mention_or_list, and use it both in auto-linking and extracting at-mentions/lists. This makes the behavior of auto-linker and extractor consistent.