 |
|
Home:
Perl Programming Help:
Regular Expressions:
Re: [NuclearClam] Simple regex problem:
Edit Log
|
|

Paul
Enthusiast
Aug 7, 2002, 2:17 AM
Views: 3497
|
|
Re: [NuclearClam] Simple regex problem
|
|
|
>> why doesn't [1] return "cabbage"? does it only match things once and put it into one element? if so, what's the point? << ....because it is matching a space followed by one or more a-z0-9_ followed by a comma so the first occurance is "bananas".....what's the point?...ask the regex author :) >> why does this return 'in1' instead of just 'in'? << Because you are printing the subroutine as well as printing shift. Try:
$blah = q(magic%jellybeans%have%sprouted%in%my%head); print bars('in'); sub bars { shift } I'm not sure of the relevance of $blah in that example
(This post was edited by RedRum on Aug 7, 2002, 2:19 AM)
|
|
|
Edit Log:
|
|
Post edited by Paul
(Enthusiast) on Aug 7, 2002, 2:18 AM
|
|
Post edited by Paul
(Enthusiast) on Aug 7, 2002, 2:19 AM
|
|
|  |