mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 11:31:08 +00:00
Adds regex util file
This commit is contained in:
parent
b941bb7ad5
commit
85a7e83340
1 changed files with 5 additions and 0 deletions
5
bookwyrm/utils/regex.py
Normal file
5
bookwyrm/utils/regex.py
Normal 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
|
Loading…
Reference in a new issue