Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: validate variable-length lines in one regex?

by Loops (Curate)
on Jul 06, 2015 at 23:12 UTC ( #1133459=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      /^[A-Z]\d\d +1?\d +\d?\d(?:\.1)? +[0-3](?: +\d?\d\.\d)+ *$/ or ($bad
    +{$line++} = $_) && next;
      my ($t, $p, $s, $d, @c) = split / +/;
    
  2. or download this
      /^[A-Z]\d\d +1?\d +\d?\d(\.1)? +[0-3]( +\d?\d\.\d)+ *$/n
    
  3. or download this
    use v5.10;
    use warnings;
    ...
    T11 2  1 0 6.0 1.1 2.2
    L06 1  1 0 1.0 3.3
    L06 1  4 0 1.1 1.8
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2022-10-07 03:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (29 votes). Check out past polls.

    Notices?