Adds regex util file

This commit is contained in:
Mouse Reeve 2020-11-01 10:57:17 -08:00
parent b941bb7ad5
commit 85a7e83340

5
bookwyrm/utils/regex.py Normal file
View file

@ -0,0 +1,5 @@
''' defining regexes for regularly used concepts '''
domain = r'[a-z-A-Z0-9_\-]+\.[a-z]+'
username = r'@[a-zA-Z_\-\.0-9]+(@%s)?' % domain
full_username = r'@[a-zA-Z_\-\.0-9]+@%s' % domain