using System.Text.RegularExpressions; namespace RhSolutions.Parsers.Fittings; [ParserKey("Коллектор G1")] public class ManifoldG1 : DrinkingWaterHeatingFitting { private static readonly Regex _portsCount = new(@"\s(?\d{1})\s"); protected override string _title => "Распределительный коллектор G1"; public override bool TryParse(string input, out string output) { var match = _portsCount.Match(input); if (match.Success) { output = $"{_title} {match.Groups["Ports"]}"; return true; } else { output = string.Empty; return false; } } }