I have multiple pre tags like below.. an example...
test
Hello
1
Hello
2
Hello
3
I need to get text value from pre tags and strip out the html tags.
O/P
Hello 1
Hello 2
Hello 3
test
Hello
1
Hello
2
Hello
3
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

HTH


Hello
1
VulpesPosted Apr 11, 2011, 3:01 PM
Sam HobbsPosted Apr 12, 2011, 2:28 AM
Suthish, do you need the output to be like you show or like the output produced by the code that Vulpes posted? The output using the RegEx does not have an embedded space, which is consistent with the way the text would look in a browser, correct?
The attached zip has code that produces the same output, including the absence of a space. If you need greater control of the data then you need to be more specific about what you need. I assume that since you accepted Vulpes's reply, you don't need the additional text.
Note that the project for the source code needs a reference to "Microsoft HTML Object Library".