fork(1) download
  1. <?php
  2.  
  3. echo preg_replace('#\*(\p{L}+)\*#', '<em>$1</em>', 'This text has *two* *italic* bits');
Success #stdin #stdout 0.01s 83072KB
stdin
Standard input is empty
stdout
This text has <em>two</em> <em>italic</em> bits