Exemplo n.º 1
0
        public string?FindMatch(string value)
        {
            var findString = new Regex(AutoTagKey.Replace("<>", @"(\w+)"));
            var match      = findString.Match(value);

            return(match.Success
                ? match.Groups[1].Value
                : null);
        }
Exemplo n.º 2
0
        public string?FindMatch(string value)
        {
            var findString = new Regex(AutoTagKey.Replace("<>", @"(\w+)"));
            var match      = findString.Match(value);

            if (!match.Success)
            {
                return(null);
            }

            return(_selectableDateParts
                   .Select(parts => parts.Key)
                   .FirstOrDefault(parts => parts == match.Groups[1].Value));
        }