Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Markdown in .NET

By: a guest on Feb 26th, 2012  |  syntax: None  |  size: 0.74 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pattern = string.Format(@"
  2.             (?:
  3.                 (?<=nn)           # Starting after a blank line
  4.                 |                   # or
  5.                 An?               # the beginning of the doc
  6.             )
  7.             (                       # save in $1
  8.                 [ ]{{0, {0}}}
  9.                 <(hr)               # start tag = $2
  10.                 b                  # word break
  11.                 ([^<>])*?           #
  12.                 /?>                 # the matching end tag
  13.                 [ t]*
  14.                 (?=n{{2,}}|Z)     # followed by a blank line or end of document
  15.             )", tabWidth - 1);
  16.         text = Regex.Replace(text, pattern, new MatchEvaluator(HtmlEvaluator), RegexOptions.IgnorePatternWhitespace);
clone this paste RAW Paste Data