87,997
社区成员




<!DOCTYPE HTML>
<html>
<head>
<meta charset="gb2312" />
<title></title>
<style>
</style>
</head>
<body>
<div id="test">
{dede:pagestyle maxwidth='' pagepicnum='' ddmaxwidth='' row='' col='' value=''/} {dede:img ddimg='/uploads/allimg/120507/1-12050G32F7.jpg' text='' width='500' height='374'} /uploads/allimg/120507/1-12050G32F7.jpg {/dede:img} {dede:img ddimg='/uploads/allimg/120507/1-12050G32F8.jpg' text='' width='500' height='374'}/uploads/allimg/120507/1-12050G32F8.jpg{/dede:img}
</div>
<script>
var $ = function(id){
return document.getElementById(id);
};
var s = $('test').innerHTML;
var re = /[^']+\.jpg(?=')/g;
alert( s.match(re) )
</script>
</body>
</html>
var str="{dede:pagestyle maxwidth='' pagepicnum='' ddmaxwidth='' row='' col='' value=''/} {dede:img ddimg='/uploads/allimg/120507/1-12050G32F7.jpg' text='' width='500' height='374'} /uploads/allimg/120507/1-12050G32F7.jpg {/dede:img} {dede:img ddimg='/uploads/allimg/120507/1-12050G32F8.jpg' text='' width='500' height='374'}/uploads/allimg/120507/1-12050G32F8.jpg{/dede:img}";
var p=/\{dede:img[^\}]*\}(.*?)\{\/dede:img\}/g;
var arr=[];
var m=null;
while(m=p.exec(str)){
arr.push(RegExp.$1);
}
alert(arr);