fork(4) download
  1. using System;
  2. using System.Linq;
  3. using System.Text.RegularExpressions;
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8.  
  9. var str = "This is a really long test string is this is this is this is this is this is this is thisit is this this has to be way more than 85 characters ssssssssssss";
  10. Console.WriteLine(Regex.Replace(str, @"(?s).{0,85}",
  11. m => m.Value.EndsWith("\n") ? m.Value + "\t" : m.Value + "\n\t"));
  12. }
  13. }
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
Success #stdin #stdout 0.13s 24904KB
stdin
Standard input is empty
stdout
This is a really long test string is this is this is this is this is this is this is 
	thisit is this this has to be way more than 85 characters ssssssssssss