perlquestion
Anonymous Monk
<p>OK, the title may be confusing, but I don't know how to write a summary for this problem.</p>
<p>I'm writing a really simple Wiki-like engine. The problem is, Wiki is much like Perl's double-quote mark, but sometimes you want a single-quote:</p>
<code>
This is **bold**, but ``this is **not** bold``.
</code>
<p>becomes</p>
<code>
This is <b>bold</b>, but this is **not** bold.
</code>
<p>In short, I want the text between two pairs of backticks not to be processed. I can't think of any way to do this with simple regexps, so please help me. :)</p>
<p>By the way, I'm using something like <tt>s/\*\*(.+?)\*\*/<b>$1</b>/gs</tt> for the tags processing; anyone has a better idea?</p>
8