From 5f951e8f213e3636f4e64190fe1a720067963108 Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 30 Jun 2022 06:44:53 -0300 Subject: [PATCH] change: better regex for removing 'The' when sorting mods Teh :| Co-authored-by: timoreo22 --- launcher/ui/pages/instance/ExternalResourcesPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/ui/pages/instance/ExternalResourcesPage.cpp b/launcher/ui/pages/instance/ExternalResourcesPage.cpp index 0b1dc4f3..02eeae3d 100644 --- a/launcher/ui/pages/instance/ExternalResourcesPage.cpp +++ b/launcher/ui/pages/instance/ExternalResourcesPage.cpp @@ -13,7 +13,7 @@ namespace { // FIXME: wasteful void RemoveThePrefix(QString& string) { - QRegularExpression regex(QStringLiteral("^(([Tt][Hh][eE])|([Tt][eE][Hh])) +")); + QRegularExpression regex(QStringLiteral("^(?:the|teh) +"), QRegularExpression::CaseInsensitiveOption); string.remove(regex); string = string.trimmed(); }