How would you write a regular expression to convert mark down into HTML? For example, you would type in the following:
This would be *italicized* text and this would be **bold** text
This would then need to be converted to:
This would be <em>italicized</em> text and this would be <strong>bold</strong> text
Very similar to the mark down edit control used by stackoverflow.
Clarification
For what it is worth, I am using C#. Also, these are the only real tags/markdown that I want to allow. The amount of text being converted would be less than 300 characters or so.
The best way is to find a version of the Markdown library ported to whatever language you are using (you did not specify in your question).
Now that you have clarified that you only want STRONG and EM to be processed, and that you are using C#, I recommend you take a look at Markdown.NET to see how those tags are implemented. As you can see, it is in fact two expressions. Here is the code: