Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^7: A Beginner Needs Homework helpby Anonymous Monk |
on Apr 11, 2014 at 21:37 UTC ( [id://1082024]=note: print w/replies, xml ) | Need Help?? |
lol... I don't really think I need substitution... :) sounds good ... That should ... the dash in front of it is undefined to me by my text book.. (elements of programming with perl) What does it say a regular expression is composed of? What is the special characters like "?" called? So if its not the same kind of character as the special "?" character, its what kind of character? :) Here is what rxrx says about the pattern (The start of a capturing block ($1)
Its pretty close except it doesn't explain the literal space character ... it does show that in the next step If you give rxrx a string, it will go a step further and show you how the regex matches To do it run rxrx then paste 'red:27 yellow:102 green:311 yellow:12 blue:45' then paste /(\w+ (-?\d+ )+)/ then type m then enter and keep hitting space to see the next step Here is what a step looks like
So hopefully you can see what you're missing, its the thing you had in split
In Section
Seekers of Perl Wisdom
|
|