Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Text.RegularExpressions;
- public class SoftUni
- {
- static void Main()
- {
- string html = Console.ReadLine();
- string pPattern = @"(?<=<p>)(.*?)(?=<\/p>)";
- string replacementPattern = @"([\W])";
- html = string.Join("", from Match match in Regex.Matches(html, pPattern) select match.Value);
- html = Regex.Replace(html, replacementPattern, " ");
- html = Regex.Replace(html, " +( |$)", "$1");
- string output = "";
- foreach (char c in html.ToLower())
- {
- if (c>=97 && c<= 109)
- {
- output += (char)(c+13);
- }
- else if (c >= 110 && c <= 122)
- {
- output += (char)(c - 13);
- }
- else
- {
- output += (char)c;
- }
- }
- Console.WriteLine(output);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement