I've been poking through the source code for Reddit (https://github.com/reddit/reddit/wiki) for the past few hours and I can't find what I'm looking for: the function that does the flat text to HTML conversion for their comments.
If you're not familiar, on the site it has a table showing you how to format your comment and converts your plain text into html for links, bold, italic, etc.
Link: http://www.reddit.com/r/technology/comments/rupkj/5000_artists_line_up_for_a_pirate_bay_promotion/c48sy1v (Hit "reply" then "formatting help" to see the table of formatting options.)
Sample input:
This should be: **bold** and **I'm also bold**
This should be: *italic* and *I'm italic too*
This should be: ~~strikethrough text~~
This should be: [A Link To Google.com](http://www.google.com)
This should be A list:
*This is a list
*Of differnet
*Things that I like
Any idea how to accomplish this elegantly with regex?
As said in the comments, you are probably looking for Markdown.