function isContinuous(s) {
var
str = s.replace(
/\d/g
,
function
($0, pos) {
return
parseInt($0)-pos;
});
if
(
/^(\d)\1+$/
.test(str))
return false
;
// 顺增
str = s.replace(
/\d/g
,
function
($0, pos) {
return
parseInt($0)+pos;
});
if
(
/^(\d)\1+$/
.test(str))
return false
;
// 顺减
return true
;
}