diff --git a/bookwyrm/utils/regex.py b/bookwyrm/utils/regex.py new file mode 100644 index 000000000..36e211d98 --- /dev/null +++ b/bookwyrm/utils/regex.py @@ -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