.NET RegExp to extract meta tags from html

Posted on 2007-08-06
Last Modified: 2013-11-22

Can somebody show me how to use a .NET regular expression to extract the meta tags from an html file? I know absolutely nothing about regexps.

The source is:

<meta name="keywords" content="blah blah blah">
<meta name="description" content="this is a description">

But it can also be written with the content part first, and name afterwards:

<meta content="blah blah blah" name="keywords" >
<meta content="this is a description" name="description" >


Question by:zattz
    LVL 12

    Accepted Solution

    LVL 28

    Assisted Solution

    Hello zattz,

    Check if this works for you:


    Author Comment

    Apologies for the delay

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now