RegEx matching HTML tags and extracting text

后端 未结 5 1426
生来不讨喜
生来不讨喜 2020-12-17 01:45

I have a string of test like this:

hey

I want to use a RegEx to modify the text between the \"customtag\

5条回答
  •  温柔的废话
    2020-12-17 01:59

    Most people use HTML Agility Pack for HTML text parsing. However, I find it a little robust and complicated for my own needs. I create a web browser control in memory, load the page, and copy the text from it. (see example below)

    You can find 3 simple examples here:

    http://jakemdrew.wordpress.com/2012/02/03/getting-only-the-text-displayed-on-a-webpage-using-c/

提交回复
热议问题