Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can some experienced monks show me how THEY would go about this?$mech->content() =~ m#Lumber:</td><td align="right"><b>(\d+)#i; my $lumber = $1; $mech->content() =~ m#Clay:</td><td align="right"><b>(\d+)#i; my $clay = $1; $mech->content() =~ m#Iron:</td><td align="right"><b>(\d+)#i; my $iron = $1; $mech->content() =~ m#Crop:</td><td align="right"><b>(\d+)#i; my $crop = $1;
Thank you!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help shorten this series of regexes
by bobf (Monsignor) on Sep 19, 2007 at 04:06 UTC | |
|
Re: help shorten this series of regexes
by GrandFather (Saint) on Sep 19, 2007 at 04:16 UTC | |
|
Re: help shorten this series of regexes
by throop (Chaplain) on Sep 19, 2007 at 04:46 UTC | |
|
Re: help shorten this series of regexes
by Anno (Deacon) on Sep 19, 2007 at 09:20 UTC | |
|
Re: help shorten this series of regexes
by Gangabass (Vicar) on Sep 19, 2007 at 05:15 UTC | |
|
Re: help shorten this series of regexes
by johngg (Canon) on Sep 19, 2007 at 09:00 UTC |