Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Data::Types or grok_number

by Kenosis (Priest)
on Sep 25, 2012 at 17:50 UTC ( #995604=note: print w/ replies, xml ) Need Help??


in reply to Data::Types or grok_number

Here's another option using Regexp::Common:

use strict; use warnings; use Regexp::Common qw/ number /; print for grep /^$RE{num}{int}$/, <DATA>; __DATA__ 3.14 10 -42 42 .14159 12.34e-56 3.0 Hello, world.

Output:

10 -42 42


Comment on Re: Data::Types or grok_number
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2014-09-16 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (46 votes), past polls