Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My attempt grabs the first one on the list but should only be grabbing the 5th one on the list???
Heres my attempt:
while (<DATA>) { chomp; if (/^(?:[\>]$var$)/) { print "MATCH => $_\n"; } } __DATA__ >Sensor30 >FooSensor30 > Sensor30 Sensor300 Sensor30 >Sensor3
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: regex needed
by jwkrahn (Abbot) on Nov 18, 2008 at 13:33 UTC | |
Re: regex needed
by McDarren (Abbot) on Nov 18, 2008 at 13:37 UTC | |
Re: regex needed
by Bloodnok (Vicar) on Nov 18, 2008 at 14:04 UTC | |
Re: regex needed
by Anonymous Monk on Nov 18, 2008 at 13:44 UTC | |
by Crian (Curate) on Nov 18, 2008 at 13:58 UTC | |
by Anonymous Monk on Nov 18, 2008 at 14:11 UTC | |
Re: regex needed
by JavaFan (Canon) on Nov 18, 2008 at 19:54 UTC |