using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string input = @"ThisIsAnExample.TitleHELLO-WORLD2019T.E.S.T.(Test)""Test""'Test'[Test]";
Regex regex = new Regex(@"(?<!^|[A-Z\p{P}])[A-Z]|(?<=\p{P})\p{P}", RegexOptions.Multiline);
Console.WriteLine(regex.Replace(input, @" $0"));
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgRXhhbXBsZQp7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCiAgICB7CiAgICAgICAgc3RyaW5nIGlucHV0ID0gQCJUaGlzSXNBbkV4YW1wbGUuVGl0bGVIRUxMTy1XT1JMRDIwMTlULkUuUy5ULihUZXN0KSIiVGVzdCIiJ1Rlc3QnW1Rlc3RdIjsKICAgICAgICBSZWdleCByZWdleCA9IG5ldyBSZWdleChAIig/PCFefFtBLVpccHtQfV0pW0EtWl18KD88PVxwe1B9KVxwe1B9IiwgUmVnZXhPcHRpb25zLk11bHRpbGluZSk7CiAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUocmVnZXguUmVwbGFjZShpbnB1dCwgQCIgJDAiKSk7CiAgICB9Cn0=