http://www.perlmonks.org?node_id=529347

jeanluca has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I need to parse dates. For example the following to dates are possible:
2005-100 2005100
So the only difference is that there might be an - or not. I'm not sure how to create an 'or' in a regexp, so what should my regexp look like ?

Thanks a lot
Luca