Im trying to create regular expression for preg_replace in php with
Input: this us * action (if) * fsfsffs
Output: <b id="action"> * action (if) * </b>
So far I'm here,
$text = " this us * action (if) * fsfsffs"
preg_replace( '#^(\s*)(\*)([^<>
]+)(\*)(\s*)$#m', '$1<b id="$3">$2 $3 $4</b>$5', $text );
Output for same i get is,
<b id=" action (if) ">* action (if) *</b>