11.10.3. Discussion
The more you know about what the ASCII text looks like, the better
your HTML conversion can be. For example, if emphasis is indicated
with *asterisks* or /slashes/ around words, you can add rules that
take care of that, as follows:
$grafs[$i] = preg_replace('/(\A|\s)\*([^*]+)\*(\s|\z)/',
'$1<b>$2</b>$3',$grafs[$i]);
$grafs[$i] = preg_replace('{(\A|\s)/([^/]+)/(\s|\z)}',
'$1<i>$2</i>$3',$grafs[$i]);