1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 08:27:49 +08:00

add regex

This commit is contained in:
Lukynka CZE 2023-09-14 17:46:29 +02:00
parent 5bda9a3024
commit 66751ef5bb

View File

@ -28,7 +28,7 @@ namespace osu.Game.Online.Chat
// http[s]://<domain>.<tld>[:port][/path][?query][#fragment]
private static readonly Regex advanced_link_regex = new Regex(
// protocol
@"(?<link>[a-z]*?:\/\/" +
@"(?<link>(https?|osu)[a-z]*?://" +
// domain + tld
@"(?<domain>(?:[a-z0-9]\.|[a-z0-9][a-z0-9-]*[a-z0-9]\.)*[a-z0-9-]*[a-z0-9]" +
// port (optional)