Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: how to split full digit number?

by hdb (Prior)
on May 06, 2013 at 11:24 UTC ( #1032256=note: print w/replies, xml ) Need Help??


in reply to how to split full digit number?

See below. I have added an extra pair of parantheses to make .9 optional...

use warnings; use strict; my $f = 'chap 89.9'; if($f=~m/chap.( |[a-z])*(\d+)(\.(\d+))?/i) { print " $2 $4\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032256]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2016-12-11 13:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.