i’m trying to validate either a month number or month name, using one regular expression.
I have
/^
0?([1-9]|1[012]) ---number check 0?1-12
|\b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May?|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|Sep(?:t)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)$/ ---name check
The two checks work fine separately, im thinking that im not joining the expression correctly, any help appreciated.
Watch where you’re putting the alternations: