function test(){ var name= "1.087"; var abc = "abd wor66k ne78xt"; var reg = /\d+/g; log(name.indexOf('.')); log(name.split('.')); log("匹配12a是否有数字:"+reg.test("12a"));//匹配成功返回true 失败false log("匹配abc56AUKg789第一次出
总结: 正则规则的声明,两种方法: exec是RegExp类的匹配方法 match是字符串类的匹配方法 var reg = /aaa/g; var reg = new RegExp("aaa","g"); 创建的时候 可以用 这两种方法创建,唯一的区别在于 第二种 用NEW的方法可以在规则内使用变量,例如 var name="xaiohua"; var reg=new RegExp("aa"+xiaohua+"aa&
英文文档: exec(object[, globals[, locals]]) This function supports dynamic execution of Python code. object must be either a string or a code object. If it is a string, the string is parsed as a suite of Python statements which is then executed (unless a
英文文档: exec(object[, globals[, locals]]) This function supports dynamic execution of Python code. object must be either a string or a code object. If it is a string, the string is parsed as a suite of Python statements which is then executed (unless a