Online C# Compiler

using System; using System.Text.RegularExpressions; class Demo { static void Main() { string str = "Hello\r\nWorld"; string[] res = Regex.Split(str, "\r\n"); foreach (string word in res) { Console.WriteLine(word); } } }