fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. class Program {
  5. static void Main() {
  6. string value = "SEQUENCE $FIRST$ THEN $SECOND$ AND FINALLY \\\\$12345";
  7. string[] lines = Regex.Split(value, @"(?<!\\\\)\$");
  8. foreach (string line in lines) {
  9. Console.WriteLine(line);
  10.  
  11. }
  12.  
  13. }
  14. }
Success #stdin #stdout 0.07s 34144KB
stdin
Standard input is empty
stdout
SEQUENCE 
FIRST
 THEN 
SECOND
 AND FINALLY \\$12345