suyar 2019-07-09 16:12:05
匹配正整數 小數 (0|([1-9]+\d*))\.\d+|[1-9]+|0
var pattern = /(0|([1-9]+\d*))\.\d+|[1-9]+|0/g,
str = '';
console.log(pattern.test(str));
-- 以下是正確的
0
0.1
1.1
-- 以下是錯誤的
0000
00.1
001.1
1.
suyar 2019-07-09 16:12:05
匹配正整數 小數 (0|([1-9]+\d*))\.\d+|[1-9]+|0
var pattern = /(0|([1-9]+\d*))\.\d+|[1-9]+|0/g,
str = '';
console.log(pattern.test(str));
-- 以下是正確的
0
0.1
1.1
-- 以下是錯誤的
0000
00.1
001.1
1.
inicio
-
Wiki
Copyright © 2011-2025 iteam.
Current version is 2.148.2.
UTC+08:00, 2025-12-14 17:59
浙ICP备14020137号-1
$mapa de visitantes$