mirror of
https://github.com/nihilvux/bancho.py.git
synced 2025-09-17 11:07:54 -07:00
24 lines
573 B
Python
24 lines
573 B
Python
from __future__ import annotations
|
|
|
|
import re
|
|
|
|
OSU_VERSION = re.compile(
|
|
r"^b(?P<date>\d{8})(?:\.(?P<revision>\d))?"
|
|
r"(?P<stream>beta|cuttingedge|dev|tourney)?$",
|
|
)
|
|
|
|
USERNAME = re.compile(r"^[\w \[\]-]{2,15}$")
|
|
EMAIL = re.compile(r"^[^@\s]{1,200}@[^@\s\.]{1,30}(?:\.[^@\.\s]{2,24})+$")
|
|
|
|
TOURNEY_MATCHNAME = re.compile(
|
|
r"^(?P<name>[a-zA-Z0-9_ ]+): "
|
|
r"\((?P<T1>[a-zA-Z0-9_ ]+)\)"
|
|
r" vs\.? "
|
|
r"\((?P<T2>[a-zA-Z0-9_ ]+)\)$",
|
|
flags=re.IGNORECASE,
|
|
)
|
|
|
|
MAPPOOL_PICK = re.compile(r"^([a-zA-Z]+)([0-9]+)$")
|
|
|
|
BEST_OF = re.compile(r"^(?:bo)?(\d{1,2})$")
|