in reply to SOLVED Regular Expression help
Tsk... tsk! If this is your Perl homework, how do you expect to master debugging?
Obviously this is an exercise in creating regular-expressions, and getting those right is truly one of the “essential skills” that is required every single day when you are using this language. If you short-change your debugging and algorithm-refinement task by calling upon the willingness of Monks, you're going to regret it soon enough.
Even though Monks are out here as a willing and able resource, if you hope to become one someday (not to mention passing a written test where you will be expected to correctly solve a problem such as this manually), you're going to have to master not only the devising of regular expressions but also their debugging. You are going to have to have had to go through variations of this exercise so frequently that it has become “second nature.”
I repeat: this is an essential skill. Go through the forest, young padewan, not around it.