Would like to find out how to validate a string such that first 3 consecutive digits cannot be 8 or 9 consecutively? Example:
88839182 (not valid)
99923213 (not valid)
98188823 (valid)
98939117 (valid)
Tried using s.match("([98]){3}")
but it doesn't seem to work, as it takes in 989 for first 3 character too.
Another, simpler way of defining the problem is "does not start with 888 or 999",
It find invalid data:
To find valid data;