2013-10-10 21:37:26 +02:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2016-12-21 13:17:53 +01:00
|
|
|
from typing import Text
|
2013-06-28 16:02:58 +02:00
|
|
|
# Match multi-word string between @** ** or match any one-word
|
|
|
|
# sequences after @
|
2017-08-16 20:18:09 +02:00
|
|
|
find_mentions = r'(?<![^\s\'\"\(,:<])@(\*\*[^\*]+\*\*|\w+)'
|
2013-06-28 16:02:58 +02:00
|
|
|
|
|
|
|
wildcards = ['all', 'everyone']
|
|
|
|
|
2013-10-09 20:48:05 +02:00
|
|
|
def user_mention_matches_wildcard(mention):
|
2016-12-21 13:17:53 +01:00
|
|
|
# type: (Text) -> bool
|
2013-10-09 20:48:05 +02:00
|
|
|
return mention in wildcards
|