I get text field in the document. I get it by Jquery
.
But sometimes text field includes <em> </em>
or <cite> </cite>
tags.
I want the raw text.
I get the text by their id such as;
$('title')[0].innerHTML
It returns me;
further cholesterol transport <em class="a-plus-plus"> Large luteal cells </em> produce <em class="a-plus-plus">more</em>
or
<cite>Sodium bicarbonate</cite> is a white solid that
How can I get the raw text as;
further cholesterol transport Large luteal cells produce more
Sodium bicarbonate is a white solid that
Should I parse the text when I get by their id, or should write a regex that detects cite
and em
tags and gets the text inside these tags. What is the best solution for this problem? Is there any solution offered for this type of parsing?