Connecting Tech Pros Worldwide Forums | Help | Site Map

HTML Parsing

SKG
Guest
 
Posts: n/a
#1: Nov 16 '05
can any one help me with HTML Parsing Regular Expression or class.

I need to parse all href tags with <A> elements.
Thanks



Nicholas Paldino [.NET/C# MVP]
Guest
 
Posts: n/a
#2: Nov 16 '05

re: HTML Parsing


SKG,

I would take a look at using MSHTML, as it will allow you to access the
object model for any element you need in the document.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

"SKG" <sunil_godiyal@yahoo.com> wrote in message
news:OtRMHWMTEHA.3224@TK2MSFTNGP10.phx.gbl...[color=blue]
> can any one help me with HTML Parsing Regular Expression or class.
>
> I need to parse all href tags with <A> elements.
> Thanks
>
>[/color]


Peter Rilling
Guest
 
Posts: n/a
#3: Nov 16 '05

re: HTML Parsing


Try this

<a.+?href\s*=\s*((["](?<xref>[^"]+)["][^>]*[>])|(['](?<xref>[^']+)['][^>]*[>
])|((?<xref>[^\s\\>]+)[^>]*[>]))

"SKG" <sunil_godiyal@yahoo.com> wrote in message
news:OtRMHWMTEHA.3224@TK2MSFTNGP10.phx.gbl...[color=blue]
> can any one help me with HTML Parsing Regular Expression or class.
>
> I need to parse all href tags with <A> elements.
> Thanks
>
>[/color]


Joerg Jooss
Guest
 
Posts: n/a
#4: Nov 16 '05

re: HTML Parsing


SKG wrote:[color=blue]
> can any one help me with HTML Parsing Regular Expression or class.
>
> I need to parse all href tags with <A> elements.[/color]

Check out Chris Lovett's SGML parser on GotDotNet:

http://www.gotdotnet.com/Community/U...4-C3BD760564BC

Cheers,

--
Joerg Jooss
joerg.jooss@gmx.net

Closed Thread


Similar C# / C Sharp bytes