Fix username regex, add media endpoint

This commit is contained in:
Zed
2019-06-25 19:19:01 +02:00
parent 632a2c6c82
commit b51f1cbbd4
2 changed files with 5 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ from unicode import Rune, `$`
const
urlRegex = re"((https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s\)]*)?)"
emailRegex = re"([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)"
usernameRegex = re"(^|[^\S]|\.|>)@([A-z0-9_]+)"
usernameRegex = re"(^|[\s\.,>])@([A-z0-9_]+)"
picRegex = re"pic.twitter.com/[^ ]+"
cardRegex = re"(https?://)?cards.twitter.com/[^ ]+"
ellipsisRegex = re" ?…"