I'm using libphonenumber and I try to check some phone numbers if they are valid with regexp pattern VALID_PHONE_NUMBER which can be found here and it looks like this
private static final String VALID_PHONE_NUMBER =
DIGITS + "{" + MIN_LENGTH_FOR_NSN + "}" + "|" +
"[" + PLUS_CHARS + "]*+(?:[" + VALID_PUNCTUATION + STAR_SIGN + HASH_SIGN +"]*" + DIGITS + "){3,}[" +
VALID_PUNCTUATION + STAR_SIGN + HASH_SIGN + VALID_ALPHA + DIGITS + "]*";
On my Android phone this expression is compiled to following
\p{Nd}{1}|[++]*+(?:[-x--?-?--/ ?? ()()[].\[\]/~?~~*#]*\p{Nd}){3,}[-x--?-?--/ ?? ()()[].\[\]/~?~~*#DEFGABCLMNOHIJKUTWVQPSRYXZdefgabclmnohijkutwvqpsryxz\p{Nd}]*
What does it mean [++]*+
Does it mean "plus-or-plus zero-or-more-times and then plus?
Does it make any sense to have two pluses next to each other?