mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Fix osump links
This commit is contained in:
parent
dd2731b873
commit
662c7c5bdc
@ -24,13 +24,20 @@ namespace osu.Game.Online.Chat
|
|||||||
// advanced, RFC-compatible regular expression that matches any possible URL, *but* allows certain invalid characters that are widely used
|
// advanced, RFC-compatible regular expression that matches any possible URL, *but* allows certain invalid characters that are widely used
|
||||||
// This is in the format (<required>, [optional]):
|
// This is in the format (<required>, [optional]):
|
||||||
// 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(@"(?<paren>\([^)]*)?" +
|
private static readonly Regex advanced_link_regex = new Regex(
|
||||||
@"(?<link>https?:\/\/" +
|
@"(?<paren>\([^)]*)?" +
|
||||||
@"(?<domain>(?:[a-z0-9]\.|[a-z0-9][a-z0-9-]*[a-z0-9]\.)*[a-z][a-z0-9-]*[a-z0-9]" + // domain, TLD
|
// protocol
|
||||||
@"(?::\d+)?)" + // port
|
@"(?<link>[a-z]*?:\/\/" +
|
||||||
@"(?<path>(?:(?:\/+(?:[a-z0-9$_\.\+!\*\',;:\(\)@&~=-]|%[0-9a-f]{2})*)*" + // path
|
// domain + tld
|
||||||
@"(?:\?(?:[a-z0-9$_\+!\*\',;:\(\)@&=\/~-]|%[0-9a-f]{2})*)?)?" + // query
|
@"(?<domain>(?:[a-z0-9]\.|[a-z0-9][a-z0-9-]*[a-z0-9]\.)*[a-z0-9-]*[a-z0-9]" +
|
||||||
@"(?:#(?:[a-z0-9$_\+!\*\',;:\(\)@&=\/~-]|%[0-9a-f]{2})*)?)?)", // fragment
|
// port (optional)
|
||||||
|
@"(?::\d+)?)" +
|
||||||
|
// path (optional)
|
||||||
|
@"(?<path>(?:(?:\/+(?:[a-z0-9$_\.\+!\*\',;:\(\)@&~=-]|%[0-9a-f]{2})*)*" +
|
||||||
|
// query (optional)
|
||||||
|
@"(?:\?(?:[a-z0-9$_\+!\*\',;:\(\)@&=\/~-]|%[0-9a-f]{2})*)?)?" +
|
||||||
|
// fragment (optional)
|
||||||
|
@"(?:#(?:[a-z0-9$_\+!\*\',;:\(\)@&=\/~-]|%[0-9a-f]{2})*)?)?)",
|
||||||
RegexOptions.IgnoreCase);
|
RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
// 00:00:000 (1,2,3) - test
|
// 00:00:000 (1,2,3) - test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user