How can I test for an increasing or decreasing number pattern in a string? Assuming the string is just a number.
Ex:
var regexp = new RegExp(...) // something here
regexp.test("123456789") //true
regexp.test("121231234") //false
regexp.test("987654321") //true
regexp.test("5678901234") //true
The test would be for a cycle of digits really. How could this be achieved?
See Question&Answers more detail:os