regular expressions for class name

Posted by user576701 on Stack Overflow See other posts from Stack Overflow or by user576701
Published on 2011-01-15T12:39:52Z Indexed on 2011/01/15 12:53 UTC
Read the original article Hit count: 157

Filed under:
|
|
|

i need a regular expressions string to get all anchor tags in a page with a specific css class name, in c#/vb.net

this is what i got so far

"<a.*?href=""(.*?)"".*?>(.*?)</a>"

but my attempts to add "class=name" isnt working, also is it possible to find links where the class name appears either before or after the href with one expression ?

i am familiar with 3rd party html libraries, but thats an overkill for what i have in mind, so is the webbrowser control.

© Stack Overflow or respective owner

Related posts about c#

Related posts about html