1、JS正则test-判断字符串是否符合规定的正则rep=/\d+/;rep.test("asdfoiklfasdf89asdfasdf")#truerep=/^\d+$/;rep.test("asdfoiklfasdf89asdfasdf")#trueJavaScriptismorefunthanJavaorJavaBeans!varpattern=/\bJava\w*\b/g;#["JavaS
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号