Watch
1
0
Fork
You've already forked nitter
0
mirror of https://github.com/zedeus/nitter synced 2026-11-22 12:57:19 +00:00

Fix url regex

This commit is contained in:
Zed 2019-06-27 22:30:00 +02:00
commit 77879a1450

View file

@ -6,7 +6,7 @@ import ./types, ./utils
from unicode import Rune, `$`
const
urlRegex = re"((https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s\)]*)?)"
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_]+)"
picRegex = re"pic.twitter.com/[^ ]+"