[backend/masto-client] Improve user lookup regex
This commit is contained in:
parent
68528b6785
commit
33a3601a79
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ public class SearchController(
|
||||||
}
|
}
|
||||||
|
|
||||||
var regex = new Regex
|
var regex = new Regex
|
||||||
("^(?:@?(?<user>[a-zA-Z0-9_]+)@(?<host>[a-zA-Z0-9-.]+\\.[a-zA-Z0-9-]+))|(?:@(?<localuser>[a-zA-Z0-9_]+))$");
|
("(?:^@?(?<user>[a-zA-Z0-9_]+)@(?<host>[a-zA-Z0-9-.]+\\.[a-zA-Z0-9-]+)$)|(?:^@(?<localuser>[a-zA-Z0-9_]+)$)");
|
||||||
var match = regex.Match(search.Query);
|
var match = regex.Match(search.Query);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue