asp.net - How to decode html string -


i have string:

<p>&nbsp;item1</p><br><p>item2</p> 

i getting editor . want convert :

item1 item2 

how can ?

you can use regular expression &(.*);

in c# like

  string pattern = @"&(.*);";   string replacement = "";   string input = "<p>&nbsp;item1</p><br><p>item2</p>";   string result = regex.replace(input, pattern, replacement);   console.writeline(result); 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -