Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Stupid regex question - numerics

by ungalnanban (Pilgrim)
on Mar 01, 2010 at 12:33 UTC ( #825898=note: print w/replies, xml ) Need Help??


in reply to Stupid regex question - numerics

See the following code for matching your pattern.
if ( $long =~ /^([\-\+]?\d+[\.]?\d*)$/ ) { print "match\n"; }
Thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://825898]
help
Chatterbox?
[marto]: the fun part, I had no fun this weekend, very stressful :)
[Corion]: But I feel an introductory talk gestating, working title "Reading CPAN" - how to read module documentation, how to judge a module, how to read the module tests/examples
[Corion]: marto: Ouch :-/ The kids are making trouble?
[Corion]: Meh - food becons, and colleagues are staring at me, talk to you later, sorry!
[marto]: Corion I've been toying with this as a background task

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-08-21 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (319 votes). Check out past polls.

    Notices?