Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2016-09-25 01:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (463 votes). Check out past polls.