I want to continue one task because my head has some problem with a regular expression. How can it be done with a regular expression and jQuery?
I have this HTML:
<div class="test"> > > Presentation Text </div>
And I want to get just this text from all this string, every time at the beginning I have
" > >
" + Some text ... these special character are not changing every time at the begin .
One way is:
$('.test').html($('.test').html().replace(/&[^;]+;/g, ''));
It works, but I realized that I have at the end some bad characters and I have to remove "\n\n\n
" as well
My output:
Presentation Text\n\n\n
But I need the clean text without "\n
" or something else, just "Presentation Text
"
What can I do to solve this problem?