Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: only want numerics in field

by davido (Cardinal)
on Apr 21, 2014 at 16:37 UTC ( [id://1083041]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if( $string =~ /^$RE{num}{real}$/ ) {
      print "Match!\n";
    ...
    else {
      print "Reject!\n";
    }
    
  2. or download this
    perl -MRegexp::Common=number -E 'say $RE{num}{real}'
    (?:(?i)(?:[-+]?)(?:(?=[.]?[0123456789])(?:[0123456789]*)(?:(?:[.])(?:[
    +0123456789]{0,}))?)(?:(?:[E])(?:(?:[-+]?)(?:[0123456789]+))|))
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-25 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found