Closed DevilRoshan closed 4 years ago
出自小程序前端面试星球
// 以下代码输出 const lowerCaseOnly = /^[a-z]+$/; console.log(lowerCaseOnly.test('str')); console.log(lowerCaseOnly.test(null)); console.log(lowerCaseOnly.test());
https://github.com/DevilRoshan/Question/blob/master/20200802-js-code-RegExp-test.md