html meta tags!

Discussion in 'ASP .Net' started by Abid, Apr 11, 2007.

  1. Abid

    Abid Guest

    Hi,

    I need to parse out the META Tags in any HTML document or can say any
    webpage...specifically I am interested in META keyword and META
    description tags...can anyone please let me know the Regular
    Expression for that...I will really appreciate it.

    Thanks in advance.
     
    Abid, Apr 11, 2007
    #1
    1. Advertising

  2. On Apr 11, 10:14 pm, "Abid" <> wrote:
    > Hi,
    >
    > I need to parse out the META Tags in any HTML document or can say any
    > webpage...specifically I am interested in META keyword and META
    > description tags...can anyone please let me know the Regular
    > Expression for that...I will really appreciate it.
    >
    > Thanks in advance.


    something like

    (?<=<meta\s+name=\"?description\"?\s+content=\"?).*?(?=>)

    and

    (?<=<meta\s+content=\"?).*?(?=\sname=\"?description\"?\s?\>)
     
    Alexey Smirnov, Apr 11, 2007
    #2
    1. Advertising

  3. Abid

    Abid Guest

    On Apr 11, 2:25 pm, "Alexey Smirnov" <> wrote:
    > On Apr 11, 10:14 pm, "Abid" <> wrote:
    >
    > > Hi,

    >
    > > I need to parse out the META Tags in any HTML document or can say any
    > > webpage...specifically I am interested in META keyword and META
    > > description tags...can anyone please let me know the Regular
    > > Expression for that...I will really appreciate it.

    >
    > > Thanks in advance.

    >
    > something like
    >
    > (?<=<meta\s+name=\"?description\"?\s+content=\"?).*?(?=>)
    >
    > and
    >
    > (?<=<meta\s+content=\"?).*?(?=\sname=\"?description\"?\s?\>)


    Thanks alot, It helped me very much.
     
    Abid, Apr 17, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    3
    Views:
    1,998
  2. Lee Harvey
    Replies:
    2
    Views:
    4,952
    Emmanuel Gleizer
    Jun 29, 2011
  3. Donald Firesmith

    html tags within meta tags allowed?

    Donald Firesmith, Jan 5, 2005, in forum: XML
    Replies:
    5
    Views:
    945
    Andy Dingley
    Jan 8, 2005
  4. Mantorok

    Meta tags in HTML

    Mantorok, May 17, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    403
    Mantorok
    May 17, 2006
  5. Max Metral

    HTML Title/Meta Attributes, ID tags, and code bloat

    Max Metral, Feb 24, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    187
    Sarmad Aljazrawi
    Feb 24, 2004
Loading...

Share This Page