JavaScript: splitting letters followed by digits
This question already has an answer here:
只需使用.filter(Boolean)
以仅保留所需的项目。
var str = 'C3B1A60';
var splits = 'C3B1A60'.split(/([A-Z]d+)/).filter(Boolean);
console.log(splits);
链接地址: http://www.djcxy.com/p/37752.html
上一篇: 什么是Array.any? 为JavaScript
下一篇: JavaScript:分割字母后跟数字