Untitled
raw download clone
TEXT
views 55
,
size 734 b
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace ConsoleApp25
{
    class Program
    {
        static void Main(string[] args)
        {

            string filePath = Console.ReadLine();

            var list = new List<string>();

            var pattern = new Regex(@"((\w+)\.\w+)");   -  хваща точно файла и разшернието с точката по средата

         
                if (pattern.IsMatch(filePath))
                {
                    list.Add(filePath);
                }
                          
           

            Console.WriteLine(string.Join(" ", list));
        }
    }
}
close fullscreen
Login or Register to edit or fork this paste. It's free.