I have this regular expression that extracts meta tags from HTML documents but it gives me errors while I incorporate it in my web application.
the expression is
@"<meta[\\s]+[^>]*?name[\\s]?=[\\s\"\']+(.*?)[\\s\"\']+content[\\s]?=[\\s\"\']+(.*?)[\"\']+.*?>" ;
is there anything wrong with it?
You’re using both the @ (verbatim string) syntax and escaping your slashes in the sample you posted. You need to either remove the @, or remove the extra slashes and escape your double quotes by doubling them up, then it should work.
(For what it’s worth, if you’re going to be working with regular expression on an ongoing basis, I would suggest investing in a copy of RegExBuddy.)