Does anyone know of a regular expression for matching on a sequence of four digits? I need a match on ascending (1234), descending (4321), or the same (1111). This would b
public static boolean isDigitAscendingSequence(String ssn) { return "0123456789".contains(ssn); }
The same logic with descending sequences