mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			299 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			299 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from __future__ import absolute_import
 | 
						|
 | 
						|
# Match multi-word string between @** ** or match any one-word
 | 
						|
# sequences after @
 | 
						|
find_mentions = r'(?<![^\s\'\"\(,:<])@(?:\*\*([^\*]+)\*\*|(\w+))'
 | 
						|
 | 
						|
wildcards = ['all', 'everyone']
 | 
						|
 | 
						|
def user_mention_matches_wildcard(mention):
 | 
						|
    return mention in wildcards
 |