Beispiel #1
0
        private CleanStringResult Clean(string name, string expression)
        {
            var result = new CleanStringResult();

            var match = _iRegexProvider.GetRegex(expression, RegexOptions.IgnoreCase).Match(name);

            if (match.Success)
            {
                result.HasChanged = true;
                name = name.Substring(0, match.Index);
            }

            result.Name = name;
            return(result);
        }
        private CleanStringResult Clean(string name, string expression)
        {
            var result = new CleanStringResult();

            var match = _iRegexProvider.GetRegex(expression, RegexOptions.IgnoreCase).Match(name);

            if (match.Success)
            {
                result.HasChanged = true;
                name = name.Substring(0, match.Index);
            }

            result.Name = name;
            return result;
        }