I have a thousand of regexes that I try to match in efficient way.
if found this question, that purpose to create a big automata from all regexes.
I tried with this code:
regexEndpoints.FirstOrDefault(x => x.UrlPathRegex.IsMatch(urlPath))
But obviously it has very bad performance, specially when not any regex is matched, so the code have to check all the regexes.
My question is if how can I get better performance to run multiple regexes in c#?