This is my HTML string<img class='left' alt='""' src='182-35622' title='MyImage_147x91.png' uri='182-35622' style='width: 147px; height: 91px;'>
How to get the "title" value from regular expression using javascript only.
I want output should be "MyImage_147x91.png"
any suggestions?
i tried so far it's not working
var htmlString = "<img class='left' alt='""' src='182-35622' title='MyImage_147x91.png' uri='182-35622' style='width: 147px; height: 91px;'>"
var setCookieMetaRegExp = /<img title=[\"'](.*)[\"'].*>/ig;
var matches = [];
while (setCookieMetaRegExp.exec(htmlString)) {
//matches.push(RegExp.$1);
}