perlpal has asked for the wisdom of the Perl Monks concerning the following question:
my $out1 = "Line 5 f3050_233_10_vserver_nfs_1 f3050_233_13_simple_aggr_raid4_1";
my $out2 = "Line 3 f3050_233_10_vserver_cifs_1 f3050_233_13_simple_aggr_raid4_1";
my $out3 = " Line 4 f3050_233_10_vserver_nfs_1 f3050_233_13_simple_aggr_raid4_1";
The regular expression is - /.*Line\s[3-30]\s+([\w-]+)\s+.*/i
This regular expression matches $out2 but not $out1 and $out3.
Im completely befuddled.
Advice is greatly appreciated!
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RegExp Pattern Matching Behavior
by kennethk (Abbot) on Jun 25, 2009 at 14:24 UTC | |
by perlpal (Scribe) on Jun 25, 2009 at 14:37 UTC | |
by kennethk (Abbot) on Jun 25, 2009 at 14:44 UTC | |
by perlpal (Scribe) on Jun 25, 2009 at 14:50 UTC | |
|
Re: RegExp Pattern Matching Behavior
by ELISHEVA (Prior) on Jun 25, 2009 at 17:14 UTC | |
by perlpal (Scribe) on Jun 26, 2009 at 06:14 UTC | |
|
Re: RegExp Pattern Matching Behavior
by Anonymous Monk on Jun 25, 2009 at 14:22 UTC | |
by kennethk (Abbot) on Jun 25, 2009 at 14:46 UTC | |
|
Re: RegExp Pattern Matching Behavior
by Gyatso (Novice) on Jun 25, 2009 at 18:07 UTC |