When parsing this
<title>I have a cat</title> <div class="chat_message_wrapper chat_message_right">
with
var re_title = new RegExp("<title>(.*?)</title>");
var content = xmlhttp.responseText;
// var title = re_title.exec(content);
var title = content.match(re_title);
// title = strip(title);
alert(title);
for some reason, I get this in an alert:
<title>I have a cat</title>,I have a cat
How can I only get the “I have a cat” part?