Advertisement
asan13

Untitled

Jul 22nd, 2017
1,146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.31 KB | None | 0 0
  1.     auto re  = [r"[^`]`([^`]+)", "```"];
  2.  
  3.     bool inCode;
  4.     foreach (m; text.matchAll(re))
  5.     {
  6.         if (m[0] == "```")
  7.         {
  8.             inCode = !inCode;
  9.         }
  10.  
  11.         if (!inCode) {
  12.             writeln(">>>");
  13.             writeln(m[1]);
  14.             writeln("<<<");
  15.         }
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement