in reply to Re: How to bold text with regexp...
in thread How to bold text with regexp...
which will only replace pairs of asterisks at beginning and ending word boundaries, where there are no space characters between the asterisks. I'm not sure if that's what the original poster meant, though.$text =~ s/\b\*([^*\s]+)\*\b/<em>$1<\/em>/g;
|
|---|