I am setting up this example Perl snippet to validate for months in a date:
Some scenarios I want to accept are:
MM M
#!/usr/bin/perl use str
To give you hint - month number "120" also matches in your version :-)
Change:
my $month = "(0[1-9]|1[012])";
to
my $month = /^(0[1-9]|1[012])$/;
and then play more with it