Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regex to match 20 chars of some digits followed by some spaces

by leriksen (Curate)
on Dec 19, 2003 at 03:02 UTC ( [id://315729]=note: print w/replies, xml ) Need Help??


in reply to Regex to match 20 chars of some digits followed by some spaces

Some collegues are first to the punch

mildside has

m/^\d((?<=\d)\d(?=([ \d]|$))|(?<=[\d ]) (?=( |$))){19}$/
another is
m/^(?=\d*(?:\d ) *(?!\d)$)[0-9 ]{20}$/

+++++++++++++++++
#!/usr/bin/perl
use warnings;use strict;use brain;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2025-01-25 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (70 votes). Check out past polls.