Answer the question
In order to leave comments, you need to log in
Why doesn't the regular expression for Java Pattern work correctly?
There is a regular expression
Pattern pattern = Pattern.compile("^(7)+(701|702|775|778|705|777|771|776|707|747|700|708)+(\\d{7})$");
Matcher matcher = pattern.matcher(value);
Answer the question
In order to leave comments, you need to log in
The perks need to be removed. Because of them, the regex can consider the correct length of the string to be more than eleven characters.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question