How to get title tag in a string of html?
.match()
returns array of matches, use
var title = result.match(/<title[^>]*>([^<]+)<\/title>/)[1];
to get value in parentheses
load your response html string into a jQuery object like so and retrieve the text
$(response).find("title").text();
CODE:
var title = result.match("<title>(.*?)</title>")[1];