I want to replace all the text nodes in a html text. I'll explain with an example: $html = "
<div>
<p>
text2 text2 word text2
<span>abcd</span>
text2 text2 word text2
<p>
this is a long, very long statement with punctuations.
</div>
Ben "<span>this is a long, very long statement with punctuations.</span>
" ile "<span>text2 text2 word text2</span>
" ile "text2 text2 word text2
" yerine ve "this is a long, very long statement with punctuations.
" istiyor
Ne için aynı düzenli ifade olmalıdır?