Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Text.RegularExpressions;
- namespace ConsoleTests
- {
- class ConsoleTests
- {
- static void Main()
- {
- string input = Console.ReadLine();
- string[] template = new string[3] {"[protocol]", "[server]", "[resource]"};
- char[] separators = new char[2] {':', '/',};
- string[] split = input.Split(separators,StringSplitOptions.RemoveEmptyEntries);
- for (int i = 0; i < split.Length; i++)
- {
- Console.WriteLine("{0}={1}",template[i],split[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment