【发布时间】:2010-09-11 18:20:28
【问题描述】:
您将如何编写正则表达式将标记转换为 HTML?例如,您可以输入以下内容:
This would be *italicized* text and this would be **bold** text
然后需要将其转换为:
This would be <em>italicized</em> text and this would be <strong>bold</strong> text
与stackoverflow使用的mark down编辑控件非常相似。
澄清
不管怎样,我使用的是 C#。此外,这些是我想要允许的 only 真实标签/降价。正在转换的文本量将少于 300 个字符左右。
【问题讨论】: