$1', $text); $text = preg_replace('/\*\*(.+?)\*\*/s', '$1', $text); $text = preg_replace('/_([^_]+)_/', '$1', $text); $text = preg_replace('/\*([^\*]+)\*/', '$1', $text); $text = str_replace("\r\n", "\n", $text); $text = str_replace("\r", "\n", $text); $text = '
' . str_replace("\n\n", '
', $text) . '
'; $text = str_replace("\n", '