Improved 'twitchChannelRegex' regexp.

This commit is contained in:
23rd
2018-10-13 17:32:01 +03:00
committed by pajlada
parent bd04aa0074
commit 3e268637f0
+1 -1
View File
@@ -1257,7 +1257,7 @@ void ChannelView::addContextMenuItems(
// Open in new split.
if (hoveredElement->getLink().type == Link::Url) {
static QRegularExpression twitchChannelRegex(
R"(^(?:https?:\/\/)?(?:www\.|go\.)?twitch\.tv\/(?<username>[a-z0-9_]+))",
R"(^(?:https?:\/\/)?(?:www\.|go\.)?twitch\.tv\/(?<username>[a-z0-9_]{3,}))",
QRegularExpression::CaseInsensitiveOption);
static QSet<QString> ignoredUsernames{
"videos",