public Regex GetMatchingCriteria() { var attr = MethodInfo .GetCustomAttributes<MatchesAttribute>() .FirstOrDefault(); return attr.With(x => x.RegularExpression).Recover(() => MethodNameToRegex(MethodInfo.Name)); }