I have a regex that contains a character class followed by TWO "cadinality" characters - not sure what else they are called. If it matters the regex engine it's running on is the built in java regex. The java string literal is:
"[a-zA-Z]{2}[ -]?+\\d{6}"
Or in non java land:
[a-zA-Z]{2}[ -]?+\d{6}
So specifically what does the [ -]?+
part mean? From testing as far as i can tell it's like the + isn't even there (originally I thought due to 'order of operations' that i wasn't aware of perhaps it would get applied to everything in front of it like there were parenthesis there).
The following pass:
ab123456, ab-123456, ab 123456
The following fail:
aa--123456, aa 123456, aa - -123456, aa-aa-123456