mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 22:22:55 +08:00
add regex
This commit is contained in:
parent
5bda9a3024
commit
66751ef5bb
@ -28,7 +28,7 @@ namespace osu.Game.Online.Chat
|
|||||||
// http[s]://<domain>.<tld>[:port][/path][?query][#fragment]
|
// http[s]://<domain>.<tld>[:port][/path][?query][#fragment]
|
||||||
private static readonly Regex advanced_link_regex = new Regex(
|
private static readonly Regex advanced_link_regex = new Regex(
|
||||||
// protocol
|
// protocol
|
||||||
@"(?<link>[a-z]*?:\/\/" +
|
@"(?<link>(https?|osu)[a-z]*?://" +
|
||||||
// domain + tld
|
// domain + tld
|
||||||
@"(?<domain>(?:[a-z0-9]\.|[a-z0-9][a-z0-9-]*[a-z0-9]\.)*[a-z0-9-]*[a-z0-9]" +
|
@"(?<domain>(?:[a-z0-9]\.|[a-z0-9][a-z0-9-]*[a-z0-9]\.)*[a-z0-9-]*[a-z0-9]" +
|
||||||
// port (optional)
|
// port (optional)
|
||||||
|
Loading…
Reference in New Issue
Block a user