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

Re: validate variable-length lines in one regex?

by Loops (Curate)
on Jul 06, 2015 at 23:12 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-24 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found