fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Example
  5. {
  6. public static void Main()
  7. {
  8. string input = @"ThisIsAnExample.TitleHELLO-WORLD2019T.E.S.T.(Test)""Test""'Test'[Test]";
  9. Regex regex = new Regex(@"(?<!^|[A-Z\p{P}])[A-Z]|(?<=\p{P})\p{P}", RegexOptions.Multiline);
  10. Console.WriteLine(regex.Replace(input, @" $0"));
  11. }
  12. }
Success #stdin #stdout 0.03s 134592KB
stdin
Standard input is empty
stdout
This Is An Example.Title HELLO-WORLD2019 T.E.S.T. (Test) "Test" 'Test' [Test]