Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Regex Homeworkby Corion (Patriarch) |
on Feb 24, 2004 at 07:15 UTC ( [id://331341]=note: print w/replies, xml ) | Need Help?? |
A good approach to abstract problems with regular expessions is to write down some concrete examples and then look at these to see a common pattern emerging. I will not do the complete work for you, because much of the process lies in thinking about what "good" concrete examples are, and in thinking about whether you did find all relevant examples or not. For your case a), the following list could be interesting:
Another thing that will be helpfull for you to meditate over is the relation between the terms "odd" and "even". A nonnegative whole number is called "odd", if the number before it is called "even". A number is called "even", if the number before it is called "odd", or if it is zero. If you still have problems going forward with this, start with an easier example:
In Section
Seekers of Perl Wisdom
|
|