The | operator has a high precedence and in your original regex will get applied first. You should be combining the two regex’s w/ grouping parentheses to make the precedence clear. As in:
"^(([A-Z]\d{8})|(\d{9}))$"
The | operator has a high precedence and in your original regex will get applied first. You should be combining the two regex’s w/ grouping parentheses to make the precedence clear. As in:
"^(([A-Z]\d{8})|(\d{9}))$"