moviewyrm/bookwyrm/utils/regex.py

6 lines
190 B
Python
Raw Normal View History

2020-11-01 18:57:17 +00:00
''' defining regexes for regularly used concepts '''
domain = r'[a-z-A-Z0-9_\-]+\.[a-z]+'
username = r'@[a-zA-Z_\-\.0-9]+(@%s)?' % domain
2020-12-12 23:19:57 +00:00
full_username = r'@?[a-zA-Z_\-\.0-9]+@%s' % domain