js提取正則中的字串

王磊的部落格發表於2015-10-16

程式碼如下:

var results = data.match(/(start=').*?(')/);
if (results != null)
{
    console.log(data[0]);
}

 

相關文章