Note that there are some explanatory texts on larger screens.

plurals
  1. POJava remove HTML from String without regular expressions
    text
    copied!<p>I am trying to remove all HTML elements from a String. Unfortunately, I cannot use regular expressions because I am developing on the Blackberry platform and regular expressions are not yet supported.</p> <p>Is there any other way that I can remove HTML from a string? I read somewhere that you can use a DOM Parser, but I couldn't find much on it.</p> <p>Text with HTML:</p> <pre><code>&lt;![CDATA[As a massive asteroid hurtles toward Earth, NASA head honcho Dan Truman (&lt;a href="http://www.netflix.com/RoleDisplay/Billy_Bob_Thornton/20000303"&gt;Billy Bob Thornton&lt;/a&gt;) hatches a plan to split the deadly rock in two before it annihilates the entire planet, calling on Harry Stamper (&lt;a href="http://www.netflix.com/RoleDisplay/Bruce_Willis/99786"&gt;Bruce Willis&lt;/a&gt;) -- the world's finest oil driller -- to head up the mission. With time rapidly running out, Stamper assembles a crack team and blasts off into space to attempt the treacherous task. &lt;a href="http://www.netflix.com/RoleDisplay/Ben_Affleck/20000016"&gt;Ben Affleck&lt;/a&gt; and &lt;a href="http://www.netflix.com/RoleDisplay/Liv_Tyler/162745"&gt;Liv Tyler&lt;/a&gt; co-star.]]&gt; </code></pre> <p>Text without HTML:</p> <p>As a massive asteroid hurtles toward Earth, NASA head honcho Dan Truman (Billy Bob Thornton) hatches a plan to split the deadly rock in two before it annihilates the entire planet, calling on Harry Stamper (Bruce Willis) -- the world's finest oil driller -- to head up the mission. With time rapidly running out, Stamper assembles a crack team and blasts off into space to attempt the treacherous task.Ben Affleck and Liv Tyler co-star.</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload