<p></p>
以外のすべての<br>
タグを削除します。しかし、<p></p>
内の休憩は傷ついてはいけません。どのように私はこれをPHPで達成することができます。以下は例です。段落の外側から区切りタグを削除する方法
$html = "<br> <p> This is the Firs para <br>
This is a line after the first break <br>
This is the line after the 2nd break <br>
Here the first para ends </p>
<br>
<br>
<p> This is the 2nd para <br>
This is a line after the first break in 2nd para <br>
This is the line after the 2nd break <br>
Here the 2nd para ends </p>"
私は結果が
以下$html = "<p> This is the Firs para <br>
This is a line after the first break <br>
This is the line after the 2nd break <br>
Here the first para ends </p>
<p> This is the 2nd para <br>
This is a line after the first break in 2nd para <br>
This is the line after the 2nd break <br>
Here the 2nd para ends </p>"
これはうまくいきましたが、私は小さな変更を加えなければなりませんでした。私は正規表現の中に一重引用符を入れ、すべての二重引用符を削除しなければならなかった。ありがとう@Arturs – Jeeva