fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string SampleText = "starttexthere\r\nothertexthereendtexthere";
  9. string RegexPattern = "(?<=starttexthere)[\\w\\r\\n]+(?=endtexthere)";
  10. Regex FindRegex = new Regex(RegexPattern);
  11. Match m = FindRegex.Match(SampleText);
  12.  
  13. Console.WriteLine(m.Value);
  14. }
  15. }
Success #stdin #stdout 0.06s 33992KB
stdin
Standard input is empty
stdout
othertexthere