我需要提取一些 html 标签中存在的 json。如何使用正则表达式从下面的 json 中提取名称(键)值
<div id="gwt_products_display_results" class="gwt_products_display_results">
<span class="JSON" style="display: none;">
{
"products": [
{
"targetURL": "/athena-mineral-fabric-by-the-yard/262682",
"listIndex": "0",
"minimumPrice": 20,
"categoryOnSale": "false",
"mfPartNumber": "FF010ATM",
"hasAtLeastOneBuyableAndPublishedItem": "true",
"attributes": [],
"partNumber": "b_FF010ATM",
"itemAsProduct": "true",
"iapAttribute": "",
"productDetailTargetURL": "/athena-mineral-fabric-by-the-yard/262682",
"iapAttributeCode": "",
"beanType": "bundle",
"name": "Athena Mineral Fabric by the Yard",
"maxListPrice": 0,
"thumbNail": "null",
"hasSaleSKUs": false,
"productId": "262682",
"currencyCode": "USD",
"hasMoreColors": false,
"xPriceLabel": "null",
"minListPrice": 0,
"maximumPrice": 20,
"iapAttributeDisplayName": "",
"shortDescription": "null",
"listId": "SEARCHRESULTS",
"categoryId": "null"
},
{
"targetURL": "/athena-slate-fabric-by-the-yard/262683",
"listIndex": "1",
"minimumPrice": 20,
"categoryOnSale": "false",
"mfPartNumber": "FF010ATS",
"hasAtLeastOneBuyableAndPublishedItem": "true",
"attributes": [],
"partNumber": "b_FF010ATS",
"itemAsProduct": "true",
"iapAttribute": "",
"productDetailTargetURL": "/athena-slate-fabric-by-the-yard/262683",
"iapAttributeCode": "",
"beanType": "bundle",
"name": "Athena Slate Fabric by the Yard",
"maxListPrice": 0,
"thumbNail": "null",
"hasSaleSKUs": false,
"productId": "262683",
"currencyCode": "USD",
"hasMoreColors": false,
"xPriceLabel": "null",
"minListPrice": 0,
"maximumPrice": 20,
"iapAttributeDisplayName": "",
"shortDescription": "null",
"listId": "SEARCHRESULTS",
"categoryId": "null"
},
{
"targetURL": "/typewriter-keys-giclee/261307",
"listIndex": "2",
"minimumPrice": 259,
"categoryOnSale": "false",
"mfPartNumber": "WD813",
"hasAtLeastOneBuyableAndPublishedItem": "true",
"attributes": [
{
"S7 - Overlay 1": "blank"
}
],
"partNumber": "p_WD813",
"itemAsProduct": "true",
"iapAttribute": "",
"productDetailTargetURL": "/typewriter-keys-giclee/261307",
"iapAttributeCode": "",
"beanType": "product",
"name": "Typewriter Keys Giclee",
"maxListPrice": 0,
"thumbNail": "null",
"hasSaleSKUs": false,
"productId": "261307",
"currencyCode": "USD",
"hasMoreColors": false,
"xPriceLabel": "null",
"minListPrice": 0,
"maximumPrice": 259,
"iapAttributeDisplayName": "",
"shortDescription": "null",
"listId": "SEARCHRESULTS",
"categoryId": "null"
}
]
}
</span>
</div>
到目前为止我尝试过的是
<span class="JSON" style="display: none;">([\s\S]+?)<\/span>