Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Problem with regex

by chanakya (Friar)
on Feb 03, 2005 at 06:30 UTC ( [id://427537]=note: print w/replies, xml ) Need Help??


in reply to Problem with regex

I got the correct value when I tried this

use strict; my $line = "this is a test=234567 line"; if ($line =~ /.*test=(\d+)/){ print $1; }
result
234567
Good Luck!!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-29 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found