Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by sauoq (Abbot)
on Dec 19, 2003 at 06:34 UTC ( [id://315753]=note: print w/replies, xml ) Need Help??


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

perl -nle 'print "match" if /^\d(?:\d| (?![^ ])){19}$/'

Matches 1 digit followed by 19 digits or spaces-not-followed-by-a-non-space.

-sauoq
"My two cents aren't worth a dime.";
  • Comment on Re: Regex to match 20 chars of some digits followed by some spaces
  • Download Code

Log In?
Username:
Password:

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

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












    Results (56 votes). Check out past polls.