String.prototype.finded = function(){
var arg = arguments
var me = this.toLowerCase()
var re = false
var list = []
if (arg.length >0)
{
list = arg[0].toString().split(",")
}
for (var i=0i<list.lengthi++)
{
if (me.indexOf(list[i].toLowerCase()) >= 0)
{
re = truebreak
}
}
return re
}
"中华人民共和国".finded("人民")//返回true
var str = "2013年11月5日上午9点"var matches = str.match(/\d+/g)
var year = matches[0]
var month = matches[1]
var date = matches[2]
var hour = matches[3]
alert([year, month, date, hour].join('\n'))