Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: how to do get digit numbers like -,.?

by frozenwithjoy (Priest)
on Jun 01, 2013 at 13:24 UTC ( #1036435=note: print w/replies, xml ) Need Help??


in reply to Re: how to do get digit numbers like -,.?
in thread how to do get digit numbers like -,.?

Just expanding upon your good answer to include the abbreviation 'Fig':
perl -E 'my @f =("2013-06-01", "fig 1-1", "Fig. 2.2", "Figure. 89-9"," +Figure 12-8","Figure 1.2"); foreach (@f) { print " $1\n" if /fig(?:ure)?\.?\s(\d+[-.,]\d+)/i; }' 1-1 2.2 89-9 12-8 1.2

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036435]
help
Chatterbox?
[Lady_Aleena]: Module is currently 104 lines but will shirnk to 63. The script using the module is currently 40 lines but will grow to 82, 180 to 146 lines total. (This is after rewrting the data files.)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-05-29 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?