Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下代码在 android 本机 Web 浏览器和 Dolphin App 上似乎都无法正常工作。
"[1212,1212],[1212,11212]".match(/\d+,\d+/g)
当我提醒此声明时,它显示“未定义”
String.match(regEx)大多数移动浏览器不支持。
String.match(regEx)
试试String.split(",")吧
String.split(",")
[1212,1212],[1212,11212]".split(",") returns an array : [ "[1212,1212]", "[1212,11212]" ]
我希望这就是你要找的。