2012-08-29 87 views

回答

3
嘗試

var re = /^(\d{3,6}M\,)*\d{3,6}M$/ 

實施例代碼

console.log(re.test("1234M,12345M,11111M")); // true 
console.log(re.test("12345M"));    // true 
console.log(re.test("12345M,"));    // false 
相關問題