Hello
I want to get the title of a web page using C#. So i'm requesting that page and getting the response page and using a regular expression to extract the title.
string regex = @"(?<=)([\s\S]*)(?=)/";
But i saw a site having two titles such as
<title>Page Title</title>
<link href="...."/>
<title>Page Title</title>
So when i use the above Regex i get the title as
Page Title</title><link href="...."/><title>Page Title
I know that Regular expressions are greedy. How to modify the Regex as ungreedy so that it gives me "Page Title"?