diff --git a/Iceshrimp.Backend/Controllers/Mastodon/SearchController.cs b/Iceshrimp.Backend/Controllers/Mastodon/SearchController.cs index eca894af..27c2b26c 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/SearchController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/SearchController.cs @@ -97,7 +97,7 @@ public class SearchController( } var regex = new Regex - ("^(?:@?(?[a-zA-Z0-9_]+)@(?[a-zA-Z0-9-.]+\\.[a-zA-Z0-9-]+))|(?:@(?[a-zA-Z0-9_]+))$"); + ("(?:^@?(?[a-zA-Z0-9_]+)@(?[a-zA-Z0-9-.]+\\.[a-zA-Z0-9-]+)$)|(?:^@(?[a-zA-Z0-9_]+)$)"); var match = regex.Match(search.Query); if (match.Success) {