mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix: improved url regex
This commit is contained in:
parent
e9da1a80b7
commit
131ee8d87c
1 changed files with 1 additions and 1 deletions
|
|
@ -186,7 +186,7 @@ namespace PluralKit.Bot
|
|||
}
|
||||
|
||||
var endsWithUrl = Regex.IsMatch(msg,
|
||||
@"(http|https)?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$");
|
||||
@"(http|https)(:\/\/)?(www\.)?([-a-zA-Z0-9@:%._\+~#=]{1,256})?\.?([a-zA-Z0-9()]{1,6})?\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$");
|
||||
if (endsWithUrl)
|
||||
{
|
||||
var urlTail = repliedTo.Content.Substring(100).Split(" ")[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue