<script language="javascript">
function getNoRepeat() {
return arguments[0].join('‖').match(/(\b[^‖]+\b)(?!.*‖\1\b)/ig);
}
var tmpArr = [1, 'a', 'ab', 'abc', 'd', 1.2, 'a+b', 'd', 'e', 5, 'a', 1, 'h', 'c', 'ab'];
var retArr = getNoRepeat(tmpArr);
alert(retArr);
</script>
<script>
alert("1,11,1.11,1111,111,11,1,1.11".match(/(\b\d+(?:\.\d+)?\b)(?!.*,\1\b)/g))
</script>
<script>
alert("123450,0,1,2,5,3,2,12,4,1,1,123450".match(/(\b\d+\b)(?!.*,\1(,|$))/ig))
</script>
<script>
alert("123450,0,1,2,5,3,2,12,4,1,1,123450".match(/(\b\d+\b)(?!(?:,[^,]+)*,\1(?:,|$))/ig))
</script>
<script>
var s = "0,1,2,5,3,2,12,4,1,1,123450";
var sTmp = (","+s.split(",").reverse().join(",")+",").replace(/,([^,]+)(?=,.*,\1,)/ig, '').split(",").reverse().join();
sTmp = sTmp.substr(1, sTmp.length-2);
alert(sTmp)
</script>
<script>
var strArr = "123450,0,1,2,5,3,2,12,4,1,1,123450".split(",")
var str = ","
for(i = 0; i < strArr.length; i++)
{
if(str.indexOf("," + strArr[i] + ",") == -1)str += strArr[i] + ","
}
alert(str.substring(1,str.length - 1))
</script>
function getNoRepeat() {
return arguments[0].join('‖').match(/(\b[^‖]+\b)(?!.*‖\1\b)/ig);
}
var tmpArr = [1, 'a', 'ab', 'abc', 'd', 1.2, 'a+b', 'd', 'e', 5, 'a', 1, 'h', 'c', 'ab'];
var retArr = getNoRepeat(tmpArr);
alert(retArr);
</script>
<script>
alert("1,11,1.11,1111,111,11,1,1.11".match(/(\b\d+(?:\.\d+)?\b)(?!.*,\1\b)/g))
</script>
<script>
alert("123450,0,1,2,5,3,2,12,4,1,1,123450".match(/(\b\d+\b)(?!.*,\1(,|$))/ig))
</script>
<script>
alert("123450,0,1,2,5,3,2,12,4,1,1,123450".match(/(\b\d+\b)(?!(?:,[^,]+)*,\1(?:,|$))/ig))
</script>
<script>
var s = "0,1,2,5,3,2,12,4,1,1,123450";
var sTmp = (","+s.split(",").reverse().join(",")+",").replace(/,([^,]+)(?=,.*,\1,)/ig, '').split(",").reverse().join();
sTmp = sTmp.substr(1, sTmp.length-2);
alert(sTmp)
</script>
<script>
var strArr = "123450,0,1,2,5,3,2,12,4,1,1,123450".split(",")
var str = ","
for(i = 0; i < strArr.length; i++)
{
if(str.indexOf("," + strArr[i] + ",") == -1)str += strArr[i] + ","
}
alert(str.substring(1,str.length - 1))
</script>
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
更新日志
2024年11月18日
2024年11月18日
- 柏菲·胭花四乐《胭花四乐》限量开盘母带ORMCD[低速原抓WAV+CUE]
- 群星《监听耳机天碟》2018[WAV分轨][1G]
- 群星《娱协奖原创金曲合辑》滚石[WAV+CUE][1.1G]
- 罗大佑《美丽岛》2CD[WAV+CUE][1.1G]
- 言承旭.2009-多出来的自由【SONY】【WAV+CUE】
- 赤道.2000-精选2CD【ACM】【WAV+UCE】
- 许廷铿.2017-神奇之旅【华纳】【WAV+CUE】
- 李克勤《罪人》环球[WAV+CUE][1G]
- 陈粒2024《乌有乡地图》有此山文化[FLAC分轨][1G]
- 蔡依林《MYSELF》 奢华庆菌版 2CD[WAV+CUE][1.5G]
- 刘春美《心与心寻世界名曲中文版》新京文[低速原抓WAV+CUE]
- 朱逢博《蔷薇蔷薇处处开》[FLAC+CUE]
- 姚璎格2005《心在哭泣》龙韵[WAV分轨]
- 费玉清《费玉清收藏》 2CD 华纳[WAV+CUE][1G]
- 徐怀钰《LOVE》台湾首版[WAV+CUE][1G]