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
In reply to regex needed by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |