Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Problem with regex

by pelagic (Curate)
on Feb 03, 2005 at 05:19 UTC ( #427526=note: print w/ replies, xml ) Need Help??


in reply to Problem with regex

I don't know what your problem is. When I try:

use strict; my $line = "this is a test=234567 line"; my ($value) = $line =~ /.*test=(\d+)/; print $value;
I get nicely:
234567

pelagic


Comment on Re: Problem with regex
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2015-07-08 05:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls