7
Reply

Get text from PRE tags

Suthish Nair

Suthish Nair

Apr 11 2011 7:37 AM
3.8k

 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)