Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: regex needed

by Anonymous Monk
on Nov 18, 2008 at 14:11 UTC ( [id://724273]=note: print w/replies, xml ) Need Help??


in reply to Re^2: regex needed
in thread regex needed

Thats what I was missing...Thank you!

I modified it a bit to include the space if it exists:

my $var = 'Sensor30'; while (<DATA>) { chomp; if (/^(>\s*)?\Q$var\E$/) { print "MATCH => $_\n"; } } __DATA__ >Sensor30 >FooSensor30 > Sensor30 Sensor300 Sensor30 >Sensor3

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://724273]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-20 06:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found