zattz
asked on
regular expression to match title tag on html page
Hi all,
Can somebody write me a regular expression to match the contents of the title tag on an html page?
Thanks
Can somebody write me a regular expression to match the contents of the title tag on an html page?
Thanks
<title>.*?</title>
ASKER
That returns the tag & contents ie "<title>blah</title>"
I only want "blah" returned.
I only want "blah" returned.
zattz,
You can do this with ....
resultString = Regex.Match(subjectString, "<title>([^<]*)</title>"). Groups[1]. Value;
Let me know if you have any questions or need more information.
b0lsc0tt
You can do this with ....
resultString = Regex.Match(subjectString,
Let me know if you have any questions or need more information.
b0lsc0tt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks ddrudik, yours works 100%
Thanks for the question and the points.