Reputation: 2382
I want to get tags content in a string with regular expression. I wrote it for just one line. When the content changed into some lines from one line, Regex will never do pattern on the tag. I choose RegexOptions.Multiline + RegexOptions.Singleline
for finding options.
My pattern in low level: (>)[ a-z A-z 0-9 ]*(</)
Thanks.
Upvotes: 1
Views: 312
Reputation: 4083
Are you looking for the nodeValue attribute? that should let you get the content from a div tag.
http://www.javascriptkit.com/domref/elementproperties.shtml
Upvotes: 0
Reputation: 15780
It's not cool parsing HTML with Regular Expressions. There's a .NET code library called HTML Agility Pack for that.
Upvotes: 2