I'ts been way too long since the last time I did this, but I have text that looks like:
*this*in a string, and I want to change it to:
<em>this</em>I tried:
$text =~ s\*(.{1,})\*/<em>$1<\/em>/g;but the matched text tends to keep going past the second "*". I *think* I need to change the "." into a range of some sort, excluding the * character. I'm not terribly worried about nested *'s, and I'm using MacPerl so I'm pretty much unable to use HTML modules that might do this for me. Anyone have some ideas what I'm doing wrong?
- Brad
In reply to How to bold text with regexp... by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |