Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If 'ifSpeed' is seen then the index is found but $2 is set if the second format is seen.if (/^ifSpeed.(\d+)|^1.3.6.1.2.1.2.2.1.5.(\d+)/){ print "Index: $1\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex question/mystery
by brian_d_foy (Abbot) on Jan 17, 2006 at 18:39 UTC | |
by Anonymous Monk on Jan 17, 2006 at 18:45 UTC | |
|
Re: regex question/mystery
by Tanktalus (Canon) on Jan 17, 2006 at 18:41 UTC | |
|
Re: regex question/mystery
by imagestrips (Initiate) on Jan 17, 2006 at 18:44 UTC | |
|
Re: regex question/mystery
by blazar (Canon) on Jan 17, 2006 at 18:40 UTC | |
|
Re: regex question/mystery
by philcrow (Priest) on Jan 17, 2006 at 18:37 UTC | |
by davido (Cardinal) on Jan 17, 2006 at 18:58 UTC |