Suthish Nair

Suthish Nair

  • NA
  • 30.5k
  • 7.2m

Get text from PRE tags

Apr 11 2011 7:37 AM

 Hi,

 I have multiple pre tags like below.. an example... 

 <p>test
 <pre style="color:red">Hello<br /><b>1</b></pre>

 <pre style="color:blue">Hello<br /><b>2</b></pre>

 <pre style="color:green">Hello<br /><b>3</b></pre>
 </p>

 I need to get text value from pre tags and strip out the html tags.

 O/P

 Hello 1

 Hello 2

 Hello 3




Answers (7)